Skip to content

Commit a93974d

Browse files
authored
[3.11] gh-116831: Fixes tests for c extension in WASI for Python 3.11 (GH-116831) (#116933)
gh-116831: Fixes tests for c extension in WASI We can skip the C extension based tests under WASI.
1 parent fb66087 commit a93974d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Lib/test/test_imp.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from test.support import os_helper
1111
from test.support import script_helper
1212
from test.support import warnings_helper
13+
from test.support import is_wasi
1314
import unittest
1415
import warnings
1516
imp = warnings_helper.import_deprecated('imp')
@@ -23,6 +24,8 @@ def requires_load_dynamic(meth):
2324
"""Decorator to skip a test if not running under CPython or lacking
2425
imp.load_dynamic()."""
2526
meth = support.cpython_only(meth)
27+
if is_wasi:
28+
return unittest.skipIf(True, 'Not supoorted in WASI')(meth)
2629
return unittest.skipIf(getattr(imp, 'load_dynamic', None) is None,
2730
'imp.load_dynamic() required')(meth)
2831

0 commit comments

Comments
 (0)