swig/Examples/test-suite/python/li_std_stream_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

12 lines
197 B
Python

from li_std_stream import *
a = A()
o = ostringstream()
o << a << " " << 2345 << " " << 1.435
if o.str() != "A class 2345 1.435":
raise RuntimeError("str failed: \"%s\"".format(o.str()))