
PYTHON -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"
