summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2023-02-03 15:49:42 +0100
committerMartin Weinelt <hexa@darmstadt.ccc.de>2023-02-03 16:38:18 +0100
commit51f802be9d7450e27e3152966f9a74b8e32395fc (patch)
treee92d3e6845724035c86d3570b8d1374518b53e2f
parent96128cb7e42794fb96a92a83fa7b903f91b7e0ac (diff)
home-assistant: Update dependencies and tests
-rw-r--r--pkgs/servers/home-assistant/component-packages.nix4
-rw-r--r--pkgs/servers/home-assistant/default.nix36
-rw-r--r--pkgs/servers/home-assistant/tests.nix4
3 files changed, 22 insertions, 22 deletions
diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix
index 4ec406ff7fb3..a2551e362a58 100644
--- a/pkgs/servers/home-assistant/component-packages.nix
+++ b/pkgs/servers/home-assistant/component-packages.nix
@@ -2970,7 +2970,8 @@
pyqvrpro
];
"qwikswitch" = ps: with ps; [
- ]; # missing inputs: pyqwikswitch
+ pyqwikswitch
+ ];
"rachio" = ps: with ps; [
pyturbojpeg
aiohttp-cors
@@ -4899,6 +4900,7 @@
"qingping"
"qld_bushfire"
"qnap_qsw"
+ "qwikswitch"
"rachio"
"radarr"
"radio_browser"
diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix
index 4bf49b71a400..62e8b042815a 100644
--- a/pkgs/servers/home-assistant/default.nix
+++ b/pkgs/servers/home-assistant/default.nix
@@ -292,6 +292,10 @@ in python.pkgs.buildPythonApplication rec {
hash = "sha256-gWcq0E/k6c4YQJwLlU379kse2u4Yn6xvLZ5QnGXVTJA=";
};
+ nativeBuildInputs = with python3.pkgs; [
+ setuptools
+ ];
+
# leave this in, so users don't have to constantly update their downstream patch handling
patches = [
(substituteAll {
@@ -328,7 +332,7 @@ in python.pkgs.buildPythonApplication rec {
'';
propagatedBuildInputs = with python.pkgs; [
- # Only packages required in setup.py
+ # Only packages required in pyproject.toml
aiohttp
astral
async-timeout
@@ -346,6 +350,7 @@ in python.pkgs.buildPythonApplication rec {
lru-dict
orjson
pip
+ pyopenssl
pyjwt
python-slugify
pyyaml
@@ -353,10 +358,8 @@ in python.pkgs.buildPythonApplication rec {
voluptuous
voluptuous-serialize
yarl
- # Not in setup.py, but used in homeassistant/util/package.py
+ # Implicit dependency via homeassistant/requirements.py
setuptools
- # Not in setup.py, but uncounditionally imported via tests/conftest.py
- paho-mqtt
] ++ componentBuildInputs ++ extraBuildInputs;
makeWrapperArgs = lib.optional skipPip "--add-flags --skip-pip";
@@ -369,22 +372,28 @@ in python.pkgs.buildPythonApplication rec {
freezegun
pytest-asyncio
pytest-aiohttp
- pytest-freezegun
+ pytest-freezer
pytest-mock
pytest-rerunfailures
pytest-socket
+ pytest-timeout
pytest-unordered
pytest-xdist
pytestCheckHook
requests-mock
respx
stdlib-list
- # required by tests/auth/mfa_modules
+ tomli
+ # required through tests/auth/mfa_modules/test_otp.py
pyotp
+ # Sneakily imported in tests/conftest.py
+ paho-mqtt
] ++ lib.concatMap (component: getPackages component python.pkgs) [
# some components are needed even if tests in tests/components are disabled
"default_config"
"hue"
+ # for tests/test_config.py::test_merge_id_schema
+ "qwikswitch"
];
pytestFlagsArray = [
@@ -395,8 +404,8 @@ in python.pkgs.buildPythonApplication rec {
"--only-rerun RuntimeError"
# enable full variable printing on error
"--showlocals"
- # helpers/test_system_info.py: AssertionError: assert 'Unknown' == 'Home Assistant Container'
- "--deselect tests/helpers/test_system_info.py::test_container_installationtype"
+ # AssertionError: assert 1 == 0
+ "--deselect tests/test_config.py::test_merge"
# tests are located in tests/
"tests"
];
@@ -408,17 +417,6 @@ in python.pkgs.buildPythonApplication rec {
"tests/pylint"
# don't bulk test all components
"tests/components"
- # pyotp since v2.4.0 complains about the short mock keys, hass pins v2.3.0
- "tests/auth/mfa_modules/test_notify.py"
- ];
-
- disabledTests = [
- # AssertionError: assert 1 == 0
- "test_merge"
- # Tests are flaky
- "test_config_platform_valid"
- # Test requires pylint>=2.13.0
- "test_invalid_discovery_info"
];
preCheck = ''
diff --git a/pkgs/servers/home-assistant/tests.nix b/pkgs/servers/home-assistant/tests.nix
index 75b63ec99a64..734823e9f475 100644
--- a/pkgs/servers/home-assistant/tests.nix
+++ b/pkgs/servers/home-assistant/tests.nix
@@ -76,8 +76,8 @@ in lib.listToAttrs (map (component: lib.nameValuePair component (
++ home-assistant.getPackages component home-assistant.python.pkgs
++ extraCheckInputs.${component} or [ ];
- disabledTests = old.disabledTests ++ extraDisabledTests.${component} or [];
- disabledTestPaths = old.disabledTestPaths ++ extraDisabledTestPaths.${component} or [ ];
+ disabledTests = old.disabledTests or [] ++ extraDisabledTests.${component} or [];
+ disabledTestPaths = old.disabledTestPaths or [] ++ extraDisabledTestPaths.${component} or [ ];
# components are more often racy than the core
dontUsePytestXdist = true;