mirror of
https://github.com/python/cpython.git
synced 2025-07-28 21:55:21 +00:00
Objects that compare equal automatically pass or fail assertAlmostEqual and assertNotAlmostEqual tests on unittest.TestCase. Issue 6567.
This commit is contained in:
parent
60931a5a58
commit
c3f79373e8
4 changed files with 24 additions and 1 deletions
|
@ -2989,6 +2989,11 @@ class Test_Assertions(TestCase):
|
|||
self.assertRaises(self.failureException,
|
||||
self.assertNotAlmostEqual, 0, .1+.1j, places=0)
|
||||
|
||||
self.assertAlmostEqual(float('inf'), float('inf'))
|
||||
self.assertRaises(self.failureException, self.assertNotAlmostEqual,
|
||||
float('inf'), float('inf'))
|
||||
|
||||
|
||||
def test_assertRaises(self):
|
||||
def _raise(e):
|
||||
raise e
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue