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
|
|
@ -4,33 +4,26 @@ error = 0
|
|||
|
||||
p = constover.test("test")
|
||||
if p != "test":
|
||||
print "test failed!"
|
||||
error = 1
|
||||
raise RuntimeError("test failed!")
|
||||
|
||||
p = constover.test_pconst("test")
|
||||
if p != "test_pconst":
|
||||
print "test_pconst failed!"
|
||||
error = 1
|
||||
raise RuntimeError("test_pconst failed!")
|
||||
|
||||
f = constover.Foo()
|
||||
p = f.test("test")
|
||||
if p != "test":
|
||||
print "member-test failed!"
|
||||
error = 1
|
||||
raise RuntimeError("member-test failed!")
|
||||
|
||||
p = f.test_pconst("test")
|
||||
if p != "test_pconst":
|
||||
print "member-test_pconst failed!"
|
||||
error = 1
|
||||
raise RuntimeError("member-test_pconst failed!")
|
||||
|
||||
p = f.test_constm("test")
|
||||
if p != "test_constmethod":
|
||||
print "member-test_constm failed!"
|
||||
error = 1
|
||||
raise RuntimeError("member-test_constm failed!")
|
||||
|
||||
p = f.test_pconstm("test")
|
||||
if p != "test_pconstmethod":
|
||||
print "member-test_pconstm failed!"
|
||||
error = 1
|
||||
raise RuntimeError("member-test_pconstm failed!")
|
||||
|
||||
sys.exit(error)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue