diff --git a/tests/components/mqtt_statestream/test_init.py b/tests/components/mqtt_statestream/test_init.py index c5c91a97eea..cd228183c9e 100644 --- a/tests/components/mqtt_statestream/test_init.py +++ b/tests/components/mqtt_statestream/test_init.py @@ -96,6 +96,9 @@ async def test_setup_and_stop_waits_for_ha( mqtt_mock.async_publish.assert_not_called() +# We use xfail with this test because there is an unhandled exception +# in a background task in this test. +# The exception is raised by mqtt.async_publish. @pytest.mark.xfail() async def test_startup_no_mqtt( hass: HomeAssistant, caplog: pytest.LogCaptureFixture