summaryrefslogtreecommitdiff
path: root/tests/pyximport/pyximport_pyimport_only.srctree
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pyximport/pyximport_pyimport_only.srctree')
-rw-r--r--tests/pyximport/pyximport_pyimport_only.srctree25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/pyximport/pyximport_pyimport_only.srctree b/tests/pyximport/pyximport_pyimport_only.srctree
new file mode 100644
index 000000000..d1769fd98
--- /dev/null
+++ b/tests/pyximport/pyximport_pyimport_only.srctree
@@ -0,0 +1,25 @@
+
+PYTHON -c "import pyimport_test; pyimport_test.test()"
+
+######## pyimport_test.py ########
+
+import os.path
+import pyximport
+
+pyximport.DEBUG_IMPORT = True
+
+pyximport.install(pyximport=False, pyimport=True,
+ build_dir=os.path.join(os.path.dirname(__file__), "TEST_TMP"))
+
+def test():
+ import mymodule
+ assert mymodule.test_string == "TEST"
+ assert mymodule.compiled
+
+######## mymodule.py ########
+
+import cython
+
+compiled = cython.compiled
+
+test_string = "TEST"