File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
packages/toolbox-core/tests Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -67,21 +67,18 @@ def sync_client_environment():
67
67
68
68
69
69
@pytest .fixture
70
- def sync_client (sync_client_environment , request ):
70
+ def sync_client (sync_client_environment ):
71
71
"""
72
72
Provides a ToolboxSyncClient instance within an isolated environment.
73
73
The client's underlying async session is automatically closed after the test.
74
74
The class-level loop/thread are managed by sync_client_environment.
75
75
"""
76
- # `sync_client_environment` has prepared the class state.
77
76
client = ToolboxSyncClient (TEST_BASE_URL )
78
77
79
- def finalizer ():
80
- client .close () # Closes the async_client's session.
81
- # Loop/thread shutdown is handled by sync_client_environment's teardown.
78
+ yield client
82
79
83
- request . addfinalizer ( finalizer )
84
- return client
80
+ client . close () # Closes the async_client's session.
81
+ # Loop/thread shutdown is handled by sync_client_environment's teardown.
85
82
86
83
87
84
@pytest .fixture ()
You can’t perform that action at this time.
0 commit comments