mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
be more generous to implementations that have implemented correctly
This commit is contained in:
parent
3caf7b9c88
commit
bace6764fa
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue