Skip to content

Commit 2ff2d76

Browse files
committed
add tests to ensure we're loading modules via service loader
1 parent 52ada44 commit 2ff2d76

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,12 @@ def test_teeiterator(self):
6666
assert [16,17,18,19] == [next(teeit2) for i in range(1, 5)]
6767
assert [16,17,18,19] == [next(teeit) for i in range(1, 5)]
6868

69+
def test_is_builtin_on_enterprise(self):
70+
import sys
71+
if sys.implementation.name == "graalpy" and __graalpython__.is_managed_launcher():
72+
import _pickle
73+
assert "built-in" in repr(_pickle)
74+
75+
6976
if __name__ == '__main__':
7077
unittest.main()

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,3 +269,11 @@ def test_pack_varargs():
269269
except TypeError:
270270
raised = True
271271
assert raised
272+
273+
274+
def test_struct_is_builtin_on_enterprise():
275+
if sys.implementation.name == "graalpy" and __graalpython__.is_managed_launcher():
276+
# none of these should fail
277+
import __graalpython_enterprise__
278+
import _struct
279+
assert "built-in" in repr(_struct)

0 commit comments

Comments
 (0)