summaryrefslogtreecommitdiffstats
path: root/Lib/unittest/test/test_assertions.py
diff options
context:
space:
mode:
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 6557104..a0db3423 100644
--- a/Lib/unittest/test/test_assertions.py
+++ b/Lib/unittest/test/test_assertions.py
@@ -271,6 +271,15 @@ class TestLongMessage(unittest.TestCase):
r"\+ \{'key': 'value'\}$",
r"\+ \{'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$",