diff --git a/tests/test_modutils.py b/tests/test_modutils.py index dc85beff78..692984b305 100644 --- a/tests/test_modutils.py +++ b/tests/test_modutils.py @@ -20,7 +20,7 @@ import astroid from astroid import modutils -from astroid.const import PY310_PLUS, WIN32 +from astroid.const import PY310_PLUS from astroid.interpreter._import import spec from . import resources @@ -269,14 +269,11 @@ def test_std_lib(self) -> None: ) def test_std_lib_found_before_same_named_package_on_path(self) -> None: - resource = resources.find("data") - sys.path.insert(0, resource) + sys.path.insert(0, resources.RESOURCE_PATH) self.addCleanup(sys.path.pop, 0) - sys_path = str(sys.path) file = modutils.file_from_modpath(["copy"]) - if WIN32: - raise AssertionError('\n'.join([resource, sys_path, file])) + self.assertNotIn("test", file) # tests/testdata/python3/data/copy.py self.assertTrue(any(stdlib in file for stdlib in modutils.STD_LIB_DIRS))