#11282: add back the fail* methods and assertDictContainsSubset.

This commit is contained in:
Ezio Melotti 2011-04-03 18:02:13 +03:00
parent b7af620747
commit 0f535013c5
6 changed files with 113 additions and 9 deletions

View file

@ -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$",