summaryrefslogtreecommitdiffstats
path: root/Lib/unittest/test/test_assertions.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_assertions.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_assertions.py')
-rw-r--r--Lib/unittest/test/test_assertions.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/unittest/test/test_assertions.py b/Lib/unittest/test/test_assertions.py
index 4a646c3..a1d20eb 100644
--- a/Lib/unittest/test/test_assertions.py
+++ b/Lib/unittest/test/test_assertions.py
@@ -223,6 +223,15 @@ class TestLongMessage(unittest.TestCase):
"\+ \{'key': 'value'\}$",
"\+ \{'key': 'value'\} : oops$"])
+ def testAssertDictContainsSubset(self):
+ with warnings.catch_warnings():
+ warnings.simplefilter("ignore", DeprecationWarning)
+
+ self.assertMessages('assertDictContainsSubset', ({'key': 'value'}, {}),
+ ["^Missing: 'key'$", "^oops$",
+ "^Missing: 'key'$",
+ "^Missing: 'key' : oops$"])
+
def testAssertMultiLineEqual(self):
self.assertMessages('assertMultiLineEqual', ("", "foo"),
[r"\+ foo$", "^oops$",