We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b29e295 commit 0bf451bCopy full SHA for 0bf451b
src/_pytest/compat.py
@@ -162,7 +162,12 @@ def getfuncargnames(
162
# it's passed as an unbound method or function, remove the first
163
# parameter name.
164
if is_method or (
165
- cls and not isinstance(inspect.getattr_static(cls, name), staticmethod)
+ # Not using `getattr` because we don't want to resolve the staticmethod.
166
+ # Not using `cls.__dict__` because we want to check the entire MRO.
167
+ cls
168
+ and not isinstance(
169
+ inspect.getattr_static(cls, name, default=None), staticmethod
170
+ )
171
):
172
arg_names = arg_names[1:]
173
# Remove any names that will be replaced with mocks.
0 commit comments