be more generous to implementations that have implemented correctly

This commit is contained in:
Benjamin Peterson 2010-07-05 17:13:21 +00:00
parent 3caf7b9c88
commit bace6764fa
1 changed files with 2 additions and 2 deletions

View File

@ -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