File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -462,13 +462,6 @@ def setup(self) -> None:
462
462
runner_fixture_id = f"_{ self .loop_scope } _scoped_runner"
463
463
if runner_fixture_id not in fixturenames :
464
464
fixturenames .append (runner_fixture_id )
465
- if not getattr (self .obj , "hypothesis" , False ) and getattr (
466
- self .obj , "is_hypothesis_test" , False
467
- ):
468
- pytest .fail (
469
- f"test function `{ self !r} ` is using Hypothesis, but pytest-asyncio "
470
- "only works with Hypothesis 3.64.0 or later."
471
- )
472
465
return super ().setup ()
473
466
474
467
def runtest (self ) -> None :
@@ -545,6 +538,16 @@ class AsyncHypothesisTest(PytestAsyncioFunction):
545
538
@hypothesis.given.
546
539
"""
547
540
541
+ def setup (self ) -> None :
542
+ if not getattr (self .obj , "hypothesis" , False ) and getattr (
543
+ self .obj , "is_hypothesis_test" , False
544
+ ):
545
+ pytest .fail (
546
+ f"test function `{ self !r} ` is using Hypothesis, but pytest-asyncio "
547
+ "only works with Hypothesis 3.64.0 or later."
548
+ )
549
+ return super ().setup ()
550
+
548
551
@staticmethod
549
552
def _can_substitute (item : Function ) -> bool :
550
553
func = item .obj
You can’t perform that action at this time.
0 commit comments