[Python-checkins] r43397 - python/trunk/Lib/ctypes/test/test_random_things.py
thomas.heller
python-checkins at python.org
Tue Mar 28 13:00:08 CEST 2006
Author: thomas.heller
Date: Tue Mar 28 13:00:08 2006
New Revision: 43397
Modified:
python/trunk/Lib/ctypes/test/test_random_things.py
Log:
Make the tests succeed with -Qnew: Do not rely on the exact wording of a ZeroDivisionError.
Modified: python/trunk/Lib/ctypes/test/test_random_things.py
==============================================================================
--- python/trunk/Lib/ctypes/test/test_random_things.py (original)
+++ python/trunk/Lib/ctypes/test/test_random_things.py Tue Mar 28 13:00:08 2006
@@ -51,16 +51,14 @@
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)
More information about the Python-checkins
mailing list