mirror of https://github.com/python/cpython
be more generous to implementations that have implemented correctly
This commit is contained in:
parent
3caf7b9c88
commit
bace6764fa
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue