diff --git a/tests/bleak/backends/winrt/test_utils.py b/tests/bleak/backends/winrt/test_utils.py index 357f3189..3c90dbcc 100644 --- a/tests/bleak/backends/winrt/test_utils.py +++ b/tests/bleak/backends/winrt/test_utils.py @@ -35,6 +35,17 @@ _CoUninitialize.argtypes = [] +@pytest.fixture(autouse=True) +def run_around_tests(): + # reset global state + try: + delattr(allow_sta, "_allowed") + except AttributeError: + pass + + yield + + @pytest.mark.asyncio async def test_assert_mta_no_init(): """Test device_path_from_characteristic_path."""