summaryrefslogtreecommitdiff
path: root/src/_pytest/python.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/_pytest/python.py')
-rw-r--r--src/_pytest/python.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/_pytest/python.py b/src/_pytest/python.py
index 944c395a8..40116ab9c 100644
--- a/src/_pytest/python.py
+++ b/src/_pytest/python.py
@@ -384,10 +384,7 @@ class PyCollector(PyobjMixin, nodes.Collector):
if isinstance(obj, staticmethod):
# staticmethods need to be unwrapped.
obj = safe_getattr(obj, "__func__", False)
- return (
- safe_getattr(obj, "__call__", False)
- and fixtures.getfixturemarker(obj) is None
- )
+ return callable(obj) and fixtures.getfixturemarker(obj) is None
else:
return False