Skip to content

Commit 7c1cc53

Browse files
committed
run this test only on graalpython
1 parent de7f146 commit 7c1cc53

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

graalpython/com.oracle.graal.python.test/src/tests/test_imports.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,14 @@ def test_recursive_import_from():
136136
assert package.recpkg.context is package.recpkg.reduction.context
137137

138138

139-
def test_imp_cached_imports():
140-
import _imp
139+
if sys.implementation.name == "graalpython":
140+
def test_imp_cached_imports():
141+
import _imp
141142

142-
finder = _imp.CachedImportFinder
143+
finder = _imp.CachedImportFinder
143144

144-
spec = finder.find_spec("encodings", None)
145-
assert spec.submodule_search_locations
145+
spec = finder.find_spec("encodings", None)
146+
assert spec.submodule_search_locations
146147

147-
spec = finder.find_spec("encodings.utf_8", None)
148-
assert not spec.submodule_search_locations
148+
spec = finder.find_spec("encodings.utf_8", None)
149+
assert not spec.submodule_search_locations

0 commit comments

Comments
 (0)