Skip to content

Commit

Permalink
use getrawcode from _pytest._code
Browse files Browse the repository at this point in the history
  • Loading branch information
asottile committed Oct 19, 2022
1 parent 05b6c96 commit fb6a4b1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/_pytest/_py/path.py
Expand Up @@ -23,6 +23,7 @@
from stat import S_ISREG

from . import error
from .._code.source import getrawcode

# Moved from local.py.
iswin32 = sys.platform == "win32" or (getattr(os, "_name", False) == "nt")
Expand Down Expand Up @@ -124,7 +125,7 @@ def _evaluate(self, kw):
if meth is None:
raise TypeError(f"no {name!r} checker available for {self.path!r}")
try:
if py.code.getrawcode(meth).co_argcount > 1:
if getrawcode(meth).co_argcount > 1:
if (not meth(value)) ^ invert:
return False
else:
Expand Down

0 comments on commit fb6a4b1

Please sign in to comment.