mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
#11282: add back the fail* methods and assertDictContainsSubset.
This commit is contained in:
parent
b7af620747
commit
0f535013c5
6 changed files with 113 additions and 9 deletions
|
@ -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$",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue