Kaydet (Commit) bace6764 authored tarafından Benjamin Peterson's avatar Benjamin Peterson

be more generous to implementations that have implemented correctly

üst 3caf7b9c
...@@ -876,8 +876,8 @@ class MathTests(unittest.TestCase): ...@@ -876,8 +876,8 @@ class MathTests(unittest.TestCase):
self.assertRaises(TypeError, math.trunc) self.assertRaises(TypeError, math.trunc)
self.assertRaises(TypeError, math.trunc, 1, 2) self.assertRaises(TypeError, math.trunc, 1, 2)
# XXX: This is not ideal, but see the comment in math_trunc(). self.assertRaises((AttributeError, TypeError), math.trunc,
self.assertRaises(AttributeError, math.trunc, TestNoTrunc()) TestNoTrunc())
t = TestNoTrunc() t = TestNoTrunc()
t.__trunc__ = lambda *args: args 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