Commit 540a74f7 authored by Stefan Behnel's avatar Stefan Behnel

Make the pyximport-pyimport tests more robust by testing that the file is...

Make the pyximport-pyimport tests more robust by testing that the file is compiled instead of looking at the "__file__" attribute.
parent c60f7e25
......@@ -17,8 +17,12 @@ pyximport.install(pyximport=False, pyimport=True,
def test():
import mymodule
assert mymodule.test_string == "TEST"
assert not mymodule.__file__.rstrip('oc').endswith('.py'), mymodule.__file__
assert mymodule.compiled
######## mymodule.py ########
import cython
compiled = cython.compiled
test_string = "TEST"
......@@ -14,8 +14,12 @@ pyximport.install(pyximport=False, pyimport=True,
def test():
import mymodule
assert mymodule.test_string == "TEST"
assert not mymodule.__file__.rstrip('oc').endswith('.py'), mymodule.__file__
assert mymodule.compiled
######## mymodule.py ########
import cython
compiled = cython.compiled
test_string = "TEST"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment