File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -223,15 +223,10 @@ def add_funcarg_pseudo_fixture_def(
223
223
def getfixturemarker (obj : object ) -> Optional ["FixtureFunctionMarker" ]:
224
224
"""Return fixturemarker or None if it doesn't exist or raised
225
225
exceptions."""
226
- try :
227
- fixturemarker : Optional [FixtureFunctionMarker ] = getattr (
228
- obj , "_pytestfixturefunction" , None
229
- )
230
- except TEST_OUTCOME :
231
- # some objects raise errors like request (from flask import request)
232
- # we don't expect them to be fixture functions
233
- return None
234
- return fixturemarker
226
+ return cast (
227
+ Optional [FixtureFunctionMarker ],
228
+ safe_getattr (obj , "_pytestfixturefunction" , None ),
229
+ )
235
230
236
231
237
232
# Parametrized fixture key, helper alias for code below.
You can’t perform that action at this time.
0 commit comments