Fix for running 'python -m' when using swig -builtin

Same as e05b5ea for -builtin.

Also added runtime tests to check 'python -m'.
This commit is contained in:
William S Fulton 2018-12-04 19:12:13 +00:00
commit 604ae7186b
17 changed files with 155 additions and 9 deletions

View file

@ -1,8 +1,18 @@
import os
import subprocess
import sys
print(" Starting subtest " + os.path.basename(__file__))
# Package brave found under one path
sys.path.insert(0, 'path1')
from brave import robin
print(" Finished from brave import robin")
if not(robin.run() == "AWAY!"):
raise RuntimeError("test failed")
commandline = sys.executable + " -m brave.robin"
subprocess.check_call(commandline, shell=True, env = {"PYTHONPATH": "path1"})
print(" Finished running: " + commandline)