We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5c99913 commit cd558feCopy full SHA for cd558fe
src/_pytest/assertion/rewrite.py
@@ -31,7 +31,7 @@
31
from _pytest._version import version
32
from _pytest.assertion import util
33
from _pytest.config import Config
34
-from _pytest.fixtures import getfixturemarker
+from _pytest.fixtures import FixtureFunctionDefinition
35
from _pytest.main import Session
36
from _pytest.pathlib import absolutepath
37
from _pytest.pathlib import fnmatch_ex
@@ -463,7 +463,7 @@ def _format_assertmsg(obj: object) -> str:
463
464
def _should_repr_global_name(obj: object) -> bool:
465
if callable(obj):
466
- return getfixturemarker(obj) is not None
+ return isinstance(obj, FixtureFunctionDefinition)
467
468
try:
469
return not hasattr(obj, "__name__")
0 commit comments