File tree 1 file changed +8
-6
lines changed
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 20
20
21
21
import astroid
22
22
from astroid import modutils
23
- from astroid .const import PY310_PLUS , WIN32
23
+ from astroid .const import PY310_PLUS , PY311_PLUS , WIN32
24
24
from astroid .interpreter ._import import spec
25
25
26
26
from . import resources
@@ -268,12 +268,14 @@ def test_std_lib(self) -> None:
268
268
os .path .realpath (os .path .__file__ .replace (".pyc" , ".py" )),
269
269
)
270
270
271
+ @pytest .mark .skipif (
272
+ WIN32 and not PY311_PLUS ,
273
+ reason = "Fails on Windows below 3.11 for what seems like a test setup/isolation issue "
274
+ "rather than a functional issue. Possibly related: "
275
+ "https://github.com/python/cpython/pull/93653 (other surrounding tests add '.' to sys.path)" ,
276
+ )
271
277
def test_std_lib_found_before_same_named_package_on_path (self ) -> None :
272
- realpath = str (resources .RESOURCE_PATH )
273
- if WIN32 :
274
- # Escape backslashes.
275
- realpath = realpath .replace ("\\ " , "\\ \\ " )
276
- sys .path .insert (0 , realpath )
278
+ sys .path .insert (0 , str (resources .RESOURCE_PATH ))
277
279
self .addCleanup (sys .path .pop , 0 )
278
280
279
281
file = modutils .file_from_modpath (["copy" ])
You can’t perform that action at this time.
0 commit comments