Use exceptions instead of printing to stdout. Part of an effort to convert Python tests to python 3 syntax.
12 lines
197 B
Python
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()))
|