We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a26784 commit eee4b52Copy full SHA for eee4b52
1 file changed
python/lib/sift_client/_tests/_internal/test_sync_wrapper.py
@@ -9,6 +9,7 @@
9
import pytest
10
11
from sift_client._internal.sync_wrapper import generate_sync_api
12
+from sift_client._internal.util.executor import run_sync_function
13
from sift_client.resources._base import ResourceBase
14
15
@@ -85,8 +86,7 @@ async def async_method_with_exception(self) -> None:
85
86
async def async_method_with_executor(self) -> str:
87
"""Test async method that uses run_in_executor, like wait_and_download."""
88
self._record_call("async_method_with_executor")
- loop = asyncio.get_running_loop()
89
- result = await loop.run_in_executor(None, lambda: "executor_result")
+ result = await run_sync_function(lambda: "executor_result")
90
return result
91
92
async def async_method_with_complex_args(
0 commit comments