Commit f0859e96 authored by Stefan Behnel's avatar Stefan Behnel

support for using pyximport in the test runner to include stdlib builds in the test runs

parent f8284d55
...@@ -1369,6 +1369,8 @@ def main(): ...@@ -1369,6 +1369,8 @@ def main():
help="working directory") help="working directory")
parser.add_option("--debug", dest="for_debugging", default=False, action="store_true", parser.add_option("--debug", dest="for_debugging", default=False, action="store_true",
help="configure for easier use with a debugger (e.g. gdb)") help="configure for easier use with a debugger (e.g. gdb)")
parser.add_option("--pyximport-py", dest="pyximport_py", default=False, action="store_true",
help="use pyximport to automatically compile imported .pyx and .py files")
options, cmd_args = parser.parse_args() options, cmd_args = parser.parse_args()
...@@ -1549,6 +1551,10 @@ def main(): ...@@ -1549,6 +1551,10 @@ def main():
else: else:
test_runner = unittest.TextTestRunner(verbosity=options.verbosity) test_runner = unittest.TextTestRunner(verbosity=options.verbosity)
if options.pyximport_py:
import pyximport
pyximport.install(pyimport=True, build_dir=os.path.join(WORKDIR, '_pyximport'))
result = test_runner.run(test_suite) result = test_runner.run(test_suite)
if options.coverage or options.coverage_xml or options.coverage_html: if options.coverage or options.coverage_xml or options.coverage_html:
......
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