Convert python tests using 2to3
These tests were converted using 2to3 and should be valid using Python 2.7 and Python 3+.
This commit is contained in:
parent
66df0bd224
commit
d4ffa46f41
66 changed files with 551 additions and 551 deletions
|
|
@ -9,35 +9,35 @@ a = A()
|
|||
|
||||
try:
|
||||
a.foo()
|
||||
except E1, e:
|
||||
except E1 as e:
|
||||
pass
|
||||
except:
|
||||
raise RuntimeError, "bad exception order"
|
||||
raise RuntimeError("bad exception order")
|
||||
|
||||
try:
|
||||
a.bar()
|
||||
except E2, e:
|
||||
except E2 as e:
|
||||
pass
|
||||
except:
|
||||
raise RuntimeError, "bad exception order"
|
||||
raise RuntimeError("bad exception order")
|
||||
|
||||
try:
|
||||
a.foobar()
|
||||
except RuntimeError, e:
|
||||
except RuntimeError as e:
|
||||
if e.args[0] != "postcatch unknown":
|
||||
raise RuntimeError("bad exception order {}".format(e.args))
|
||||
|
||||
|
||||
try:
|
||||
a.barfoo(1)
|
||||
except E1, e:
|
||||
except E1 as e:
|
||||
pass
|
||||
except:
|
||||
raise RuntimeError, "bad exception order"
|
||||
raise RuntimeError("bad exception order")
|
||||
|
||||
try:
|
||||
a.barfoo(2)
|
||||
except E2, e:
|
||||
except E2 as e:
|
||||
pass
|
||||
except:
|
||||
raise RuntimeError, "bad exception order"
|
||||
raise RuntimeError("bad exception order")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue