summaryrefslogtreecommitdiffstats
path: root/Lib/unittest/test/_test_warnings.py
diff options
context:
space:
mode:
authorEzio Melotti <none@none>2011-04-03 15:02:13 (GMT)
committerEzio Melotti <none@none>2011-04-03 15:02:13 (GMT)
commit0f535013c54955164388d3bf11858b9e42bed39e (patch)
treeedb17c1a5697abee5f03308d167dd0df614bbc83 /Lib/unittest/test/_test_warnings.py
parentb7af620747a542c8173fc9d2fef59e1141e9ff20 (diff)
downloadcpython-0f535013c54955164388d3bf11858b9e42bed39e.zip
cpython-0f535013c54955164388d3bf11858b9e42bed39e.tar.gz
cpython-0f535013c54955164388d3bf11858b9e42bed39e.tar.bz2
#11282: add back the fail* methods and assertDictContainsSubset.
Diffstat (limited to 'Lib/unittest/test/_test_warnings.py')
-rw-r--r--Lib/unittest/test/_test_warnings.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/unittest/test/_test_warnings.py b/Lib/unittest/test/_test_warnings.py
index bfabb02..d0be18d 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)