File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -288,7 +288,7 @@ def pytest_pyfunc_call(pyfuncitem):
288
288
where the wrapped test coroutine is executed in an event loop.
289
289
"""
290
290
if "asyncio" in pyfuncitem .keywords :
291
- if getattr (pyfuncitem .obj , "is_hypothesis_test" , False ):
291
+ if _is_hypothesis_test (pyfuncitem .obj ):
292
292
pyfuncitem .obj .hypothesis .inner_test = wrap_in_sync (
293
293
pyfuncitem .obj .hypothesis .inner_test ,
294
294
_loop = pyfuncitem .funcargs ["event_loop" ],
@@ -300,6 +300,10 @@ def pytest_pyfunc_call(pyfuncitem):
300
300
yield
301
301
302
302
303
+ def _is_hypothesis_test (function ) -> bool :
304
+ return getattr (function , "is_hypothesis_test" , False )
305
+
306
+
303
307
def wrap_in_sync (func , _loop ):
304
308
"""Return a sync wrapper around an async function executing it in the
305
309
current event loop."""
You can’t perform that action at this time.
0 commit comments