Author: thomas.heller Date: Thu Jul 12 21:42:59 2007 New Revision: 56332 Modified: python/branches/py3k-struni/Lib/ctypes/test/test_repr.py python/branches/py3k-struni/Lib/ctypes/test/test_structures.py Log: Simple fixes.
Modified: python/branches/py3k-struni/Lib/ctypes/test/test_repr.py ============================================================================== --- python/branches/py3k-struni/Lib/ctypes/test/test_repr.py (original) +++ python/branches/py3k-struni/Lib/ctypes/test/test_repr.py Thu Jul 12 21:42:59 2007 @@ -22,7 +22,7 @@ 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__": Modified: python/branches/py3k-struni/Lib/ctypes/test/test_structures.py ============================================================================== --- python/branches/py3k-struni/Lib/ctypes/test/test_structures.py (original) +++ python/branches/py3k-struni/Lib/ctypes/test/test_structures.py Thu Jul 12 21:42:59 2007 @@ -291,15 +291,9 @@ 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) _______________________________________________ Python-3000-checkins mailing list Python-3000-checkins@python.org http://mail.python.org/mailman/listinfo/python-3000-checkins