Ensure asyncio blocking checks are undone after tests run (#119542)
* Ensure asyncio blocking checks are undone after tests run * no reason to ever enable twice * we are patching objects, make it more generic * make sure bootstrap unblocks as well * move disable to tests only * re-protect * Update tests/test_block_async_io.py Co-authored-by: Erik Montnemery <erik@montnemery.com> * Revert "Update tests/test_block_async_io.py" This reverts commit 2d46028e21b4095479302629a201c3cfc811b2c2. * tweak name * fixture only * Update tests/conftest.py * Update tests/conftest.py * Apply suggestions from code review --------- Co-authored-by: Erik Montnemery <erik@montnemery.com>
This commit is contained in:
@@ -55,6 +55,11 @@ async def apply_stop_hass(stop_hass: None) -> None:
|
||||
"""Make sure all hass are stopped."""
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def disable_block_async_io(disable_block_async_io):
|
||||
"""Disable the loop protection from block_async_io after each test."""
|
||||
|
||||
|
||||
@pytest.fixture(scope="module", autouse=True)
|
||||
def mock_http_start_stop() -> Generator[None]:
|
||||
"""Mock HTTP start and stop."""
|
||||
|
||||
Reference in New Issue
Block a user