swig/Examples/python/import_packages/namespace_pkg/nonpkg.py
luz paz c8bec18554 Fix various typos
Found via `codespell -q 3 -L ans,anumber,ba,bae,chello,clos,cmo,coo,dout,fo,funktion,goin,inout,methid,nd,nin,nnumber,object,objekt,od,ois,packag,parm,parms,pres,statics,strack,struc,tempdate,te,thru,uint,upto,writen`
2022-04-11 07:59:36 +12:00

22 lines
620 B
Python

import os
import subprocess
import sys
def run_except_on_windows(commandline, env=None):
if os.name != "nt" and sys.platform != "cygwin":
# Strange failures on windows/cygwin/mingw
subprocess.check_call(commandline, env=env, shell=True)
print(" Finished running: " + commandline)
print(" Starting subtest " + os.path.basename(__file__))
# import robin as a module in the global namespace
import robin
print(" Finished importing robin")
if not(robin.run() == "AWAY!"):
raise RuntimeError("test failed")
commandline = sys.executable + " -m robin"
run_except_on_windows(commandline)