Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
bb7f16dd
Commit
bb7f16dd
authored
Aug 07, 2012
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added test cases for pyximport
parent
7e039fc9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
0 deletions
+41
-0
tests/pyximport/pyximport_basic.srctree
tests/pyximport/pyximport_basic.srctree
+18
-0
tests/pyximport/pyximport_pyimport.srctree
tests/pyximport/pyximport_pyimport.srctree
+23
-0
No files found.
tests/pyximport/pyximport_basic.srctree
0 → 100644
View file @
bb7f16dd
PYTHON -c "import basic_test; basic_test.test()"
######## basic_test.py ########
import os.path
import pyximport
pyximport.install(build_dir=os.path.join(os.path.dirname(__file__), "BUILD"))
def test():
import mymodule
assert mymodule.test_string == "TEST"
assert not mymodule.__file__.rstrip('oc').endswith('.py'), mymodule.__file__
######## mymodule.pyx ########
test_string = "TEST"
tests/pyximport/pyximport_pyimport.srctree
0 → 100644
View file @
bb7f16dd
PYTHON -s -S -c "import pyimport_test; pyimport_test.test()"
######## pyimport_test.py ########
import os.path
import pyximport
# blacklist for speed
import pyximport.pyxbuild, Cython.Compiler.Pipeline
import distutils.core, distutils.ccompiler, distutils.command.build
pyximport.install(pyximport=False, pyimport=True,
build_dir=os.path.join(os.path.dirname(__file__), "BUILD"))
def test():
import mymodule
assert mymodule.test_string == "TEST"
assert not mymodule.__file__.rstrip('oc').endswith('.py'), mymodule.__file__
######## mymodule.py ########
test_string = "TEST"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment