diff options
Diffstat (limited to 'nixpkgs/pkgs/servers/home-assistant/tests.nix')
-rw-r--r-- | nixpkgs/pkgs/servers/home-assistant/tests.nix | 41 |
1 files changed, 34 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/servers/home-assistant/tests.nix b/nixpkgs/pkgs/servers/home-assistant/tests.nix index ae2d91b933f9..77bb02662bc4 100644 --- a/nixpkgs/pkgs/servers/home-assistant/tests.nix +++ b/nixpkgs/pkgs/servers/home-assistant/tests.nix @@ -5,15 +5,19 @@ let # some components' tests have additional dependencies extraCheckInputs = with home-assistant.python.pkgs; { - alexa = [ ha-av ]; - camera = [ ha-av ]; + alexa = [ av ]; + bluetooth = [ pyswitchbot ]; + camera = [ av ]; cloud = [ mutagen ]; config = [ pydispatcher ]; - generic = [ ha-av ]; + generic = [ av ]; google_translate = [ mutagen ]; + homeassistant_yellow = [ bellows zha-quirks zigpy-deconz zigpy-xbee zigpy-zigate zigpy-znp ]; lovelace = [ PyChromecast ]; - nest = [ ha-av ]; + nest = [ av ]; onboarding = [ pymetno radios rpi-bad-power ]; + raspberry_pi = [ rpi-bad-power ]; + tomorrowio = [ pyclimacell ]; version = [ aioaseko ]; voicerss = [ mutagen ]; yandextts = [ mutagen ]; @@ -34,13 +38,31 @@ let # homeassistant.components.roku.media_player:media_player.py:428 Media type music is not supported with format None (mime: audio/x-matroska) "test_services_play_media_audio" ]; + rfxtrx = [ + # bytearrray mismatch + "test_rfy_cover" + ]; }; extraPytestFlagsArray = { asuswrt = [ - # asuswrt/test_config_flow.py: Sandbox network limitations, fails with unexpected error + # Sandbox network limitations, fails with unexpected error "--deselect tests/components/asuswrt/test_config_flow.py::test_on_connect_failed" ]; + history_stats = [ + # Flaky: AssertionError: assert '0.0' == '12.0' + "--deselect tests/components/history_stats/test_sensor.py::test_end_time_with_microseconds_zeroed" + ]; + skybell = [ + # Sandbox network limitations: Cannot connect to host cloud.myskybell.com:443 + "--deselect tests/components/skybell/test_config_flow.py::test_flow_user_unknown_error" + ]; + stream = [ + # Tries to write to /example and gets "Permission denied" + "--deselect tests/components/stream/test_recorder.py::test_record_lookback" + "--deselect tests/components/stream/test_recorder.py::test_recorder_log" + "--deselect tests/components/stream/test_worker.py::test_get_image" + ]; }; in lib.listToAttrs (map (component: lib.nameValuePair component ( home-assistant.overridePythonAttrs (old: { @@ -56,7 +78,11 @@ in lib.listToAttrs (map (component: lib.nameValuePair component ( disabledTests = old.disabledTests ++ extraDisabledTests.${component} or []; disabledTestPaths = old.disabledTestPaths ++ extraDisabledTestPaths.${component} or [ ]; + # components are more often racy than the core + dontUsePytestXdist = true; + pytestFlagsArray = lib.remove "tests" old.pytestFlagsArray + ++ [ "--numprocesses=4" ] ++ extraPytestFlagsArray.${component} or [ ] ++ [ "tests/components/${component}" ]; @@ -66,9 +92,10 @@ in lib.listToAttrs (map (component: lib.nameValuePair component ( meta = old.meta // { broken = lib.elem component [ - "airtouch4" + "blebox" # all tests fail with: AttributeError: Mock object has no attribute 'async_from_host' "dnsip" - "zwave" + "ssdp" + "subaru" ]; # upstream only tests on Linux, so do we. platforms = lib.platforms.linux; |