swig/Examples/test-suite/python/catches_strings_runme.py
2022-09-19 09:09:29 +01:00

11 lines
341 B
Python

from catches_strings import *
exception_thrown = False
try:
StringsThrower.charstring()
except RuntimeError as e:
if "charstring message" not in str(e):
raise RuntimeError("incorrect exception message:" + str(e))
exception_thrown = True
if not exception_thrown:
raise RuntimeError("Should have thrown an exception")