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.
This commit is contained in:
William S Fulton 2020-08-13 21:22:47 +01:00
commit 365d4961d4
40 changed files with 123 additions and 254 deletions

View file

@ -3,21 +3,17 @@ import cpp_enum
f = cpp_enum.Foo()
if f.hola != f.Hello:
print f.hola
raise RuntimeError
raise RuntimeError("f.hola: {}".format(f.hola))
f.hola = f.Hi
if f.hola != f.Hi:
print f.hola
raise RuntimeError
raise RuntimeError("f.hola: {}".format(f.hola))
f.hola = f.Hello
if f.hola != f.Hello:
print f.hola
raise RuntimeError
raise RuntimeError("f.hola: {}".format(f.hola))
cpp_enum.cvar.hi = cpp_enum.Hello
if cpp_enum.cvar.hi != cpp_enum.Hello:
print cpp_enum.cvar.hi
raise RuntimeError
raise RuntimeError("cpp_enum.cvar.hi: {}".format(cpp_enum.cvar.hi))