summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2007-07-12 19:42:59 (GMT)
committerThomas Heller <theller@ctypes.org>2007-07-12 19:42:59 (GMT)
commitf0d8b6eee9762eba3e3c075ddba1c5542e0e64b9 (patch)
treec46b71ba96662708c418ba6f4e28858c14273890
parent3821e31d19343ff8694f6e2c86c12c0dcd127527 (diff)
downloadcpython-f0d8b6eee9762eba3e3c075ddba1c5542e0e64b9.zip
cpython-f0d8b6eee9762eba3e3c075ddba1c5542e0e64b9.tar.gz
cpython-f0d8b6eee9762eba3e3c075ddba1c5542e0e64b9.tar.bz2
Simple fixes.
-rw-r--r--Lib/ctypes/test/test_repr.py2
-rw-r--r--Lib/ctypes/test/test_structures.py12
2 files changed, 4 insertions, 10 deletions
diff --git a/Lib/ctypes/test/test_repr.py b/Lib/ctypes/test/test_repr.py
index f6f9366..383082f 100644
--- a/Lib/ctypes/test/test_repr.py
+++ b/Lib/ctypes/test/test_repr.py
@@ -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__":
diff --git a/Lib/ctypes/test/test_structures.py b/Lib/ctypes/test/test_structures.py
index ab98a66..0aa4aea 100644
--- a/Lib/ctypes/test/test_structures.py
+++ b/Lib/ctypes/test/test_structures.py
@@ -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)