Commit bace6764 authored by Benjamin Peterson's avatar Benjamin Peterson

be more generous to implementations that have implemented correctly

parent 3caf7b9c
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment