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
|
|
@ -7,31 +7,31 @@ c = minherit.FooBar()
|
|||
d = minherit.Spam()
|
||||
|
||||
if a.xget() != 1:
|
||||
raise RuntimeError, "Bad attribute value"
|
||||
raise RuntimeError("Bad attribute value")
|
||||
|
||||
if b.yget() != 2:
|
||||
raise RuntimeError, "Bad attribute value"
|
||||
raise RuntimeError("Bad attribute value")
|
||||
|
||||
if c.xget() != 1 or c.yget() != 2 or c.zget() != 3:
|
||||
raise RuntimeError, "Bad attribute value"
|
||||
raise RuntimeError("Bad attribute value")
|
||||
|
||||
if d.xget() != 1 or d.yget() != 2 or d.zget() != 3 or d.wget() != 4:
|
||||
raise RuntimeError, "Bad attribute value"
|
||||
raise RuntimeError("Bad attribute value")
|
||||
|
||||
|
||||
if minherit.xget(a) != 1:
|
||||
raise RuntimeError, "Bad attribute value %d" % (minherit.xget(a))
|
||||
raise RuntimeError("Bad attribute value %d" % (minherit.xget(a)))
|
||||
|
||||
if minherit.yget(b) != 2:
|
||||
raise RuntimeError, "Bad attribute value %d" % (minherit.yget(b))
|
||||
raise RuntimeError("Bad attribute value %d" % (minherit.yget(b)))
|
||||
|
||||
if minherit.xget(c) != 1 or minherit.yget(c) != 2 or minherit.zget(c) != 3:
|
||||
raise RuntimeError, "Bad attribute value %d %d %d" % (
|
||||
minherit.xget(c), minherit.yget(c), minherit.zget(c))
|
||||
raise RuntimeError("Bad attribute value %d %d %d" % (
|
||||
minherit.xget(c), minherit.yget(c), minherit.zget(c)))
|
||||
|
||||
if minherit.xget(d) != 1 or minherit.yget(d) != 2 or minherit.zget(d) != 3 or minherit.wget(d) != 4:
|
||||
raise RuntimeError, "Bad attribute value %d %d %d %d" % (
|
||||
minherit.xget(d), minherit.yget(d), minherit.zget(d), minherit.wget(d))
|
||||
raise RuntimeError("Bad attribute value %d %d %d %d" % (
|
||||
minherit.xget(d), minherit.yget(d), minherit.zget(d), minherit.wget(d)))
|
||||
|
||||
# Cleanse all of the pointers and see what happens
|
||||
|
||||
|
|
@ -41,27 +41,27 @@ cc = minherit.toFooBarPtr(c)
|
|||
dd = minherit.toSpamPtr(d)
|
||||
|
||||
if aa.xget() != 1:
|
||||
raise RuntimeError, "Bad attribute value"
|
||||
raise RuntimeError("Bad attribute value")
|
||||
|
||||
if bb.yget() != 2:
|
||||
raise RuntimeError, "Bad attribute value"
|
||||
raise RuntimeError("Bad attribute value")
|
||||
|
||||
if cc.xget() != 1 or cc.yget() != 2 or cc.zget() != 3:
|
||||
raise RuntimeError, "Bad attribute value"
|
||||
raise RuntimeError("Bad attribute value")
|
||||
|
||||
if dd.xget() != 1 or dd.yget() != 2 or dd.zget() != 3 or dd.wget() != 4:
|
||||
raise RuntimeError, "Bad attribute value"
|
||||
raise RuntimeError("Bad attribute value")
|
||||
|
||||
if minherit.xget(aa) != 1:
|
||||
raise RuntimeError, "Bad attribute value %d" % (minherit.xget(aa))
|
||||
raise RuntimeError("Bad attribute value %d" % (minherit.xget(aa)))
|
||||
|
||||
if minherit.yget(bb) != 2:
|
||||
raise RuntimeError, "Bad attribute value %d" % (minherit.yget(bb))
|
||||
raise RuntimeError("Bad attribute value %d" % (minherit.yget(bb)))
|
||||
|
||||
if minherit.xget(cc) != 1 or minherit.yget(cc) != 2 or minherit.zget(cc) != 3:
|
||||
raise RuntimeError, "Bad attribute value %d %d %d" % (
|
||||
minherit.xget(cc), minherit.yget(cc), minherit.zget(cc))
|
||||
raise RuntimeError("Bad attribute value %d %d %d" % (
|
||||
minherit.xget(cc), minherit.yget(cc), minherit.zget(cc)))
|
||||
|
||||
if minherit.xget(dd) != 1 or minherit.yget(dd) != 2 or minherit.zget(dd) != 3 or minherit.wget(dd) != 4:
|
||||
raise RuntimeError, "Bad attribute value %d %d %d %d" % (
|
||||
minherit.xget(dd), minherit.yget(dd), minherit.zget(dd), minherit.wget(dd))
|
||||
raise RuntimeError("Bad attribute value %d %d %d %d" % (
|
||||
minherit.xget(dd), minherit.yget(dd), minherit.zget(dd), minherit.wget(dd)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue