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:
parent
e535190c34
commit
365d4961d4
40 changed files with 123 additions and 254 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue