Remove further 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
64d3617b3c
commit
9169555628
2 changed files with 15 additions and 15 deletions
|
|
@ -7,36 +7,36 @@ g = Grok(f)
|
|||
|
||||
try:
|
||||
x = b.x
|
||||
print "Error! b.x"
|
||||
raise RuntimeError("Error! b.x")
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
try:
|
||||
x = s.x
|
||||
print "Error! s.x"
|
||||
raise RuntimeError("Error! s.x")
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
try:
|
||||
x = g.x
|
||||
print "Error! g.x"
|
||||
raise RuntimeError("Error! g.x")
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
try:
|
||||
x = b.getx()
|
||||
print "Error! b.getx()"
|
||||
raise RuntimeError("Error! b.getx()")
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
try:
|
||||
x = s.getx()
|
||||
print "Error! s.getx()"
|
||||
raise RuntimeError("Error! s.getx()")
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
try:
|
||||
x = g.getx()
|
||||
print "Error! g.getx()"
|
||||
raise RuntimeError("Error! g.getx()")
|
||||
except AttributeError:
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue