Commit f0d8b6ee authored by Thomas Heller's avatar Thomas Heller

Simple fixes.

parent 3821e31d
......@@ -22,7 +22,7 @@ class ReprTest(unittest.TestCase):
self.failUnlessEqual("<X object at", repr(typ(42))[:12])
def test_char(self):
self.failUnlessEqual("c_char('x')", repr(c_char('x')))
self.failUnlessEqual("c_char(s'x')", repr(c_char('x')))
self.failUnlessEqual("<X object at", repr(X('x'))[:12])
if __name__ == "__main__":
......
......@@ -291,15 +291,9 @@ class StructureTestCase(unittest.TestCase):
cls, msg = self.get_except(Person, "Someone", (1, 2))
self.failUnlessEqual(cls, RuntimeError)
# In Python 2.5, Exception is a new-style class, and the repr changed
if issubclass(Exception, object):
self.failUnlessEqual(msg,
"(Phone) <type 'TypeError'>: "
"expected string or Unicode object, int found")
else:
self.failUnlessEqual(msg,
"(Phone) TypeError: "
"expected string or Unicode object, int found")
self.failUnlessEqual(msg,
"(Phone) <type 'TypeError'>: "
"expected string, int found")
cls, msg = self.get_except(Person, "Someone", ("a", "b", "c"))
self.failUnlessEqual(cls, RuntimeError)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment