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:
462462 runner_fixture_id = f"_{ self .loop_scope } _scoped_runner"
463463 if runner_fixture_id not in fixturenames :
464464 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- )
472465 return super ().setup ()
473466
474467 def runtest (self ) -> None :
@@ -545,6 +538,16 @@ class AsyncHypothesisTest(PytestAsyncioFunction):
545538 @hypothesis.given.
546539 """
547540
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+
548551 @staticmethod
549552 def _can_substitute (item : Function ) -> bool :
550553 func = item .obj
You can’t perform that action at this time.
0 commit comments