change istestfunction to callable() (#8374)
This commit is contained in:
parent
b7f2d7ca61
commit
22c0dace3b
|
@ -384,10 +384,7 @@ class PyCollector(PyobjMixin, nodes.Collector):
|
||||||
if isinstance(obj, staticmethod):
|
if isinstance(obj, staticmethod):
|
||||||
# staticmethods need to be unwrapped.
|
# staticmethods need to be unwrapped.
|
||||||
obj = safe_getattr(obj, "__func__", False)
|
obj = safe_getattr(obj, "__func__", False)
|
||||||
return (
|
return callable(obj) and fixtures.getfixturemarker(obj) is None
|
||||||
safe_getattr(obj, "__call__", False)
|
|
||||||
and fixtures.getfixturemarker(obj) is None
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue