Skip to content

Commit eee4b52

Browse files
committed
python(refactor): use run_sync_function util instead of reimplementing in test_sync_wrapper
1 parent 1a26784 commit eee4b52

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

python/lib/sift_client/_tests/_internal/test_sync_wrapper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import pytest
1010

1111
from sift_client._internal.sync_wrapper import generate_sync_api
12+
from sift_client._internal.util.executor import run_sync_function
1213
from sift_client.resources._base import ResourceBase
1314

1415

@@ -85,8 +86,7 @@ async def async_method_with_exception(self) -> None:
8586
async def async_method_with_executor(self) -> str:
8687
"""Test async method that uses run_in_executor, like wait_and_download."""
8788
self._record_call("async_method_with_executor")
88-
loop = asyncio.get_running_loop()
89-
result = await loop.run_in_executor(None, lambda: "executor_result")
89+
result = await run_sync_function(lambda: "executor_result")
9090
return result
9191

9292
async def async_method_with_complex_args(

0 commit comments

Comments
 (0)