mirror of https://github.com/python/cpython.git
looking up on the type is correct, so this isn't an XXX
This commit is contained in:
parent
f34e82ef49
commit
97c694b90b
|
@ -923,13 +923,6 @@ class TestNoTrunc(object):
|
|||
self.assertRaises(TypeError, math.trunc, 1, 2)
|
||||
self.assertRaises(TypeError, math.trunc, TestNoTrunc())
|
||||
|
||||
# XXX Doesn't work because the method is looked up on
|
||||
# the type only.
|
||||
#t = TestNoTrunc()
|
||||
#t.__trunc__ = lambda *args: args
|
||||
#self.assertEquals((), math.trunc(t))
|
||||
#self.assertRaises(TypeError, math.trunc, t, 0)
|
||||
|
||||
def testIsnan(self):
|
||||
self.assertTrue(math.isnan(float("nan")))
|
||||
self.assertTrue(math.isnan(float("inf")* 0.))
|
||||
|
|
Loading…
Reference in New Issue