File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 6161FixtureFunction = Union [SimpleFixtureFunction , FactoryFixtureFunction ]
6262FixtureFunctionMarker = Callable [[FixtureFunction ], FixtureFunction ]
6363
64- # https://github.com/pytest-dev/pytest/pull/9510
65- FixtureDef = Any
64+ # https://github.com/pytest-dev/pytest/commit/fb55615d5e999dd44306596f340036c195428ef1
65+ if pytest .version_tuple < (8 , 0 ):
66+ FixtureDef = Any
67+ else :
68+ from pytest import FixtureDef
6669
6770
6871class PytestAsyncioError (Exception ):
@@ -315,7 +318,7 @@ def _wrap_asyncgen_fixture(fixturedef: FixtureDef, event_loop_fixture_id: str) -
315318
316319 @functools .wraps (fixture )
317320 def _asyncgen_fixture_wrapper (request : FixtureRequest , ** kwargs : Any ):
318- unittest = False if pytest . version_tuple >= ( 8 , 2 ) else fixturedef . unittest
321+ unittest = fixturedef . unittest if hasattr ( fixturedef , "unittest" ) else False
319322 func = _perhaps_rebind_fixture_func (fixture , request .instance , unittest )
320323 event_loop = kwargs .pop (event_loop_fixture_id )
321324 gen_obj = func (
You can’t perform that action at this time.
0 commit comments