swig/Examples/test-suite/python/inctest_runme.py
William S Fulton 365d4961d4 Remove print statements from Python tests
Use exceptions instead of printing to stdout.
Part of an effort to convert Python tests to python 3 syntax.
2020-08-13 21:22:47 +01:00

21 lines
499 B
Python

import inctest
try:
a = inctest.A()
except:
raise RuntimeError("didn't find A, therefore, I didn't include 'testdir/subdir1/hello.i'")
pass
try:
b = inctest.B()
except:
raise RuntimeError("didn't find B, therefore, I didn't include 'testdir/subdir2/hello.i'")
pass
# Check the import in subdirectory worked
if inctest.importtest1(5) != 15:
raise RuntimeError("import test 1 failed")
if inctest.importtest2("black") != "white":
raise RuntimeError("import test 2 failed")