Skip to content

Commit 041792e

Browse files
committed
fix: Remove properties exposing internal state from sync client
1 parent 9dc1a7a commit 041792e

File tree

2 files changed

+0
-36
lines changed

2 files changed

+0
-36
lines changed

packages/toolbox-core/src/toolbox_core/sync_client.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,6 @@ async def create_client():
6363
create_client(), self.__class__.__loop
6464
).result()
6565

66-
@property
67-
def _async_client(self) -> ToolboxClient:
68-
return self.__async_client
69-
70-
@property
71-
def _loop(self) -> Optional[AbstractEventLoop]:
72-
return self.__class__.__loop
73-
74-
@property
75-
def _thread(self) -> Optional[Thread]:
76-
return self.__class__.__thread
77-
7866
def close(self):
7967
"""
8068
Synchronously closes the underlying client session. Doing so will cause

packages/toolbox-core/tests/test_sync_client.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -669,27 +669,3 @@ def sync_client_with_mocks() -> Generator[ToolboxSyncClient, Any, Any]:
669669

670670
client = ToolboxSyncClient(TEST_BASE_URL)
671671
yield client
672-
673-
674-
def test_sync_client_underscore_async_client_property(
675-
sync_client_with_mocks: ToolboxSyncClient,
676-
):
677-
"""Tests the _async_client property."""
678-
assert isinstance(sync_client_with_mocks._async_client, AsyncMock)
679-
680-
681-
def test_sync_client_underscore_loop_property(
682-
sync_client_with_mocks: ToolboxSyncClient,
683-
):
684-
"""Tests the _loop property."""
685-
assert sync_client_with_mocks._loop is not None
686-
assert isinstance(sync_client_with_mocks._loop, AbstractEventLoop)
687-
688-
689-
def test_sync_client_underscore_thread_property(
690-
sync_client_with_mocks: ToolboxSyncClient,
691-
):
692-
"""Tests the _thread property."""
693-
assert sync_client_with_mocks._thread is not None
694-
assert isinstance(sync_client_with_mocks._thread, Thread)
695-
assert sync_client_with_mocks._thread.is_alive()

0 commit comments

Comments
 (0)