summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2006-03-28 11:00:08 (GMT)
committerThomas Heller <theller@ctypes.org>2006-03-28 11:00:08 (GMT)
commit240ec6b9efc2d9d9a23ee76383051acc2df9e074 (patch)
treeb143506d39443b2587bee852b07f81057e69f4f3
parentf871270c92494efc86211167676cbc812a23a1bb (diff)
downloadcpython-240ec6b9efc2d9d9a23ee76383051acc2df9e074.zip
cpython-240ec6b9efc2d9d9a23ee76383051acc2df9e074.tar.gz
cpython-240ec6b9efc2d9d9a23ee76383051acc2df9e074.tar.bz2
Make the tests succeed with -Qnew: Do not rely on the exact wording of a ZeroDivisionError.
-rw-r--r--Lib/ctypes/test/test_random_things.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/Lib/ctypes/test/test_random_things.py b/Lib/ctypes/test/test_random_things.py
index cd50ca8..78a665b 100644
--- a/Lib/ctypes/test/test_random_things.py
+++ b/Lib/ctypes/test/test_random_things.py
@@ -51,16 +51,14 @@ class CallbackTracbackTestCase(unittest.TestCase):
def test_IntegerDivisionError(self):
cb = CFUNCTYPE(c_int, c_int)(callback_func)
out = self.capture_stderr(cb, 0)
- self.failUnlessEqual(out.splitlines()[-1],
- "ZeroDivisionError: "
- "integer division or modulo by zero")
+ self.failUnlessEqual(out.splitlines()[-1][:19],
+ "ZeroDivisionError: ")
def test_FloatDivisionError(self):
cb = CFUNCTYPE(c_int, c_double)(callback_func)
out = self.capture_stderr(cb, 0.0)
- self.failUnlessEqual(out.splitlines()[-1],
- "ZeroDivisionError: "
- "float division")
+ self.failUnlessEqual(out.splitlines()[-1][:19],
+ "ZeroDivisionError: ")
def test_TypeErrorDivisionError(self):
cb = CFUNCTYPE(c_int, c_char_p)(callback_func)