aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'pypy/module/imp/test')
-rw-r--r--pypy/module/imp/test/test_app.py3
-rw-r--r--pypy/module/imp/test/test_import.py11
2 files changed, 14 insertions, 0 deletions
diff --git a/pypy/module/imp/test/test_app.py b/pypy/module/imp/test/test_app.py
index e96588fbf2..49b3ad5f0f 100644
--- a/pypy/module/imp/test/test_app.py
+++ b/pypy/module/imp/test/test_app.py
@@ -47,6 +47,9 @@ class AppTestImpModule:
elif mode == self.imp.PY_COMPILED:
assert suffix in ('.pyc', '.pyo')
assert type == 'rb'
+ elif mode == self.imp.C_EXTENSION:
+ assert suffix.endswith(('.pyd', '.so'))
+ assert type == 'rb'
def test_obscure_functions(self):
diff --git a/pypy/module/imp/test/test_import.py b/pypy/module/imp/test/test_import.py
index 056fe9caf9..5a27ab84df 100644
--- a/pypy/module/imp/test/test_import.py
+++ b/pypy/module/imp/test/test_import.py
@@ -473,6 +473,17 @@ class AppTestImport:
except ImportError:
pass
+class TestAbi:
+ def test_abi_tag(self):
+ space1 = gettestobjspace(soabi='TEST')
+ space2 = gettestobjspace(soabi='')
+ if sys.platform == 'win32':
+ assert importing.get_so_extension(space1) == '.TESTi.pyd'
+ assert importing.get_so_extension(space2) == '.pyd'
+ else:
+ assert importing.get_so_extension(space1) == '.TESTi.so'
+ assert importing.get_so_extension(space2) == '.so'
+
def _getlong(data):
x = marshal.dumps(data)
return x[-4:]