summaryrefslogtreecommitdiff
path: root/Lib/test/test_unittest.py
diff options
context:
space:
mode:
authorMichael Foord <fuzzyman@voidspace.org.uk>2009-09-13 16:40:02 +0000
committerMichael Foord <fuzzyman@voidspace.org.uk>2009-09-13 16:40:02 +0000
commitc3f79373e89cfe926b6e1f9e2f73dada1cbfff8e (patch)
tree4a11186cdbaef8d375972f162e32bcd2169a73f8 /Lib/test/test_unittest.py
parent60931a5a580321b4b225bec9e133ed3998eb7d1a (diff)
downloadcpython-git-c3f79373e89cfe926b6e1f9e2f73dada1cbfff8e.tar.gz
Objects that compare equal automatically pass or fail assertAlmostEqual and assertNotAlmostEqual tests on unittest.TestCase. Issue 6567.
Diffstat (limited to 'Lib/test/test_unittest.py')
-rw-r--r--Lib/test/test_unittest.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_unittest.py b/Lib/test/test_unittest.py
index 5c3921dfd9..2fab7de979 100644
--- a/Lib/test/test_unittest.py
+++ b/Lib/test/test_unittest.py
@@ -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