From: Benjamin Peterson Date: Mon, 5 Jul 2010 17:13:21 +0000 (+0000) Subject: be more generous to implementations that have implemented correctly X-Git-Tag: v2.7.1rc1~646 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bace6764fac7800883029d7f34dc56d17a1530a0;p=python be more generous to implementations that have implemented correctly --- diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py index 3049ef1f47..680c6ac2bb 100644 --- a/Lib/test/test_math.py +++ b/Lib/test/test_math.py @@ -876,8 +876,8 @@ class MathTests(unittest.TestCase): self.assertRaises(TypeError, math.trunc) self.assertRaises(TypeError, math.trunc, 1, 2) - # XXX: This is not ideal, but see the comment in math_trunc(). - self.assertRaises(AttributeError, math.trunc, TestNoTrunc()) + self.assertRaises((AttributeError, TypeError), math.trunc, + TestNoTrunc()) t = TestNoTrunc() t.__trunc__ = lambda *args: args