diff --git a/_pytest/python.py b/_pytest/python.py index 6548cdbf5..0ad18b3ef 100644 --- a/_pytest/python.py +++ b/_pytest/python.py @@ -1918,14 +1918,14 @@ class FixtureManager: autousenames = [] for name in dir(holderobj): obj = getattr(holderobj, name, None) - if not callable(obj): - continue # fixture functions have a pytest_funcarg__ prefix (pre-2.3 style) # or are "@pytest.fixture" marked marker = getfixturemarker(obj) if marker is None: if not name.startswith(self._argprefix): continue + if not callable(obj): + continue marker = defaultfuncargprefixmarker name = name[len(self._argprefix):] elif not isinstance(marker, FixtureFunctionMarker):