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 05b6c96 commit f8169fcCopy full SHA for f8169fc
src/_pytest/_py/path.py
@@ -109,6 +109,8 @@ def endswith(self, arg):
109
return str(self.path).endswith(arg)
110
111
def _evaluate(self, kw):
112
+ from .._code.source import getrawcode
113
+
114
for name, value in kw.items():
115
invert = False
116
meth = None
@@ -124,7 +126,7 @@ def _evaluate(self, kw):
124
126
if meth is None:
125
127
raise TypeError(f"no {name!r} checker available for {self.path!r}")
128
try:
- if py.code.getrawcode(meth).co_argcount > 1:
129
+ if getrawcode(meth).co_argcount > 1:
130
if (not meth(value)) ^ invert:
131
return False
132
else:
0 commit comments