summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/termplotlib/gnuplot-subprocess.patch
diff options
context:
space:
mode:
authorRobert Schütz <nix@dotlambda.de>2025-11-16 13:45:27 -0800
committerRobert Schütz <nix@dotlambda.de>2025-11-16 13:45:42 -0800
commit0f06078c6f97b8d5ff2058d52418620c3684a7d6 (patch)
tree4242f04f1f19d9adfd67946ed2a2460abb65ea69 /pkgs/development/python-modules/termplotlib/gnuplot-subprocess.patch
parentaab616ef8f7b91163b076a9c9d402d68048decbb (diff)
home-assistant: skip another flaky test
Multiple people have seen failures like this: _________________ test_platform_multiple_triggers[sync_action] _________________ [gw6] linux -- Python 3.13.9 /nix/store/7gl4khq26h625mpqzkiiqsify3hclar1-python3-3.13.9/bin/python3.13 hass = <HomeAssistant RUNNING> action_method = <bound method TriggerActionFunctionTypeHelper.sync_action of <tests.helpers.test_trigger.TriggerActionFunctionTypeHelper object at 0x7fffa6c58550>> @pytest.mark.parametrize("action_method", ["cb_action", "sync_action", "async_action"]) async def test_platform_multiple_triggers( hass: HomeAssistant, action_method: str ) -> None: """Test a trigger platform with multiple trigger.""" class MockTrigger(Trigger): """Mock trigger.""" @classmethod async def async_validate_config( cls, hass: HomeAssistant, config: ConfigType ) -> ConfigType: """Validate config.""" return config class MockTrigger1(MockTrigger): """Mock trigger 1.""" async def async_attach_runner( self, run_action: TriggerActionRunner ) -> CALLBACK_TYPE: """Attach a trigger.""" run_action({"extra": "test_trigger_1"}, "trigger 1 desc") class MockTrigger2(MockTrigger): """Mock trigger 2.""" async def async_attach_runner( self, run_action: TriggerActionRunner ) -> CALLBACK_TYPE: """Attach a trigger.""" run_action({"extra": "test_trigger_2"}, "trigger 2 desc") async def async_get_triggers(hass: HomeAssistant) -> dict[str, type[Trigger]]: return { "_": MockTrigger1, "trig_2": MockTrigger2, } mock_integration(hass, MockModule("test")) mock_platform(hass, "test.trigger", Mock(async_get_triggers=async_get_triggers)) config_1 = [{"platform": "test"}] config_2 = [{"platform": "test.trig_2", "options": {"x": 1}}] config_3 = [{"platform": "test.unknown_trig"}] assert await async_validate_trigger_config(hass, config_1) == config_1 assert await async_validate_trigger_config(hass, config_2) == config_2 with pytest.raises( vol.Invalid, match="Invalid trigger 'test.unknown_trig' specified" ): await async_validate_trigger_config(hass, config_3) log_cb = MagicMock() action_helper = TriggerActionFunctionTypeHelper() action_method = getattr(action_helper, action_method) await async_initialize_triggers(hass, config_1, action_method, "test", "", log_cb) > assert len(action_helper.action_calls) == 1 E assert 0 == 1 E + where 0 = len([]) E + where [] = <tests.helpers.test_trigger.TriggerActionFunctionTypeHelper object at 0x7fffa6c58550>.action_calls MockTrigger = <class 'tests.helpers.test_trigger.test_platform_multiple_triggers.<locals>.MockTrigger'> MockTrigger1 = <class 'tests.helpers.test_trigger.test_platform_multiple_triggers.<locals>.MockTrigger1'> MockTrigger2 = <class 'tests.helpers.test_trigger.test_platform_multiple_triggers.<locals>.MockTrigger2'> action_helper = <tests.helpers.test_trigger.TriggerActionFunctionTypeHelper object at 0x7fffa6c58550> action_method = <bound method TriggerActionFunctionTypeHelper.sync_action of <tests.helpers.test_trigger.TriggerActionFunctionTypeHelper object at 0x7fffa6c58550>> async_get_triggers = <function test_platform_multiple_triggers.<locals>.async_get_triggers at 0x7fff807a32e0> config_1 = [{'platform': 'test'}] config_2 = [{'options': {'x': 1}, 'platform': 'test.trig_2'}] config_3 = [{'platform': 'test.unknown_trig'}] hass = <HomeAssistant RUNNING> log_cb = <MagicMock id='140735954672608'> tests/helpers/test_trigger.py:530: AssertionError
Diffstat (limited to 'pkgs/development/python-modules/termplotlib/gnuplot-subprocess.patch')
0 files changed, 0 insertions, 0 deletions