Skip to content

Commit 215d6d1

Browse files
committed
chore: Delint
1 parent a1aa609 commit 215d6d1

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

packages/toolbox-core/tests/test_sync_client.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515

1616
import inspect
17+
from asyncio import run_coroutine_threadsafe
1718
from typing import Any, Callable, Mapping, Optional
1819
from unittest.mock import AsyncMock, Mock, patch
19-
from asyncio import run_coroutine_threadsafe
2020

2121
import pytest
2222
from aioresponses import CallbackResult, aioresponses
@@ -28,13 +28,14 @@
2828

2929
TEST_BASE_URL = "http://toolbox.example.com"
3030

31-
# The original `ToolboxSyncClient.close()` is a blocking method because it
32-
# calls `.result()`. In the pytest environment, this blocking call creates a
33-
# deadlock during the test teardown phase when it conflicts with the
34-
# `sync_client_environment` fixture that also manages the background thread.
35-
#
36-
# By replacing `close` with our non-blocking version for the test run,
37-
# we prevent this deadlock and allow the test suite to tear down cleanly.
31+
32+
# The original `ToolboxSyncClient.close()` is a blocking method because it
33+
# calls `.result()`. In the pytest environment, this blocking call creates a
34+
# deadlock during the test teardown phase when it conflicts with the
35+
# `sync_client_environment` fixture that also manages the background thread.
36+
#
37+
# By replacing `close` with our non-blocking version for the test run,
38+
# we prevent this deadlock and allow the test suite to tear down cleanly.
3839
@pytest.fixture(autouse=True)
3940
def patch_sync_client_for_deadlock(monkeypatch):
4041
"""
@@ -52,6 +53,7 @@ def non_blocking_close(self):
5253

5354
monkeypatch.setattr(ToolboxSyncClient, "close", non_blocking_close)
5455

56+
5557
@pytest.fixture
5658
def sync_client_environment():
5759
"""

0 commit comments

Comments
 (0)