From 0f535013c54955164388d3bf11858b9e42bed39e Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Sun, 3 Apr 2011 18:02:13 +0300 Subject: #11282: add back the fail* methods and assertDictContainsSubset. --- Lib/unittest/test/_test_warnings.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Lib/unittest/test/_test_warnings.py') diff --git a/Lib/unittest/test/_test_warnings.py b/Lib/unittest/test/_test_warnings.py index bfabb02b31..d0be18d4ad 100644 --- a/Lib/unittest/test/_test_warnings.py +++ b/Lib/unittest/test/_test_warnings.py @@ -19,12 +19,17 @@ def warnfun(): warnings.warn('rw', RuntimeWarning) class TestWarnings(unittest.TestCase): - # unittest warnings will be printed at most once per type + # unittest warnings will be printed at most once per type (max one message + # for the fail* methods, and one for the assert* methods) def test_assert(self): self.assertEquals(2+2, 4) self.assertEquals(2*2, 4) self.assertEquals(2**2, 4) + def test_fail(self): + self.failUnless(1) + self.failUnless(True) + def test_other_unittest(self): self.assertAlmostEqual(2+2, 4) self.assertNotAlmostEqual(4+4, 2) -- cgit v1.2.1