mirror of
https://github.com/python/cpython.git
synced 2025-07-24 19:54:21 +00:00
#27364: fix "incorrect" uses of escape character in the stdlib.
And most of the tools. Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and Martin Panter.
This commit is contained in:
parent
513d7478a1
commit
44b548dda8
83 changed files with 324 additions and 324 deletions
|
@ -240,7 +240,7 @@ class TestLongMessage(unittest.TestCase):
|
|||
# Error messages are multiline so not testing on full message
|
||||
# assertTupleEqual and assertListEqual delegate to this method
|
||||
self.assertMessages('assertSequenceEqual', ([], [None]),
|
||||
["\+ \[None\]$", "^oops$", r"\+ \[None\]$",
|
||||
[r"\+ \[None\]$", "^oops$", r"\+ \[None\]$",
|
||||
r"\+ \[None\] : oops$"])
|
||||
|
||||
def testAssertSetEqual(self):
|
||||
|
@ -250,21 +250,21 @@ class TestLongMessage(unittest.TestCase):
|
|||
|
||||
def testAssertIn(self):
|
||||
self.assertMessages('assertIn', (None, []),
|
||||
['^None not found in \[\]$', "^oops$",
|
||||
'^None not found in \[\]$',
|
||||
'^None not found in \[\] : oops$'])
|
||||
[r'^None not found in \[\]$', "^oops$",
|
||||
r'^None not found in \[\]$',
|
||||
r'^None not found in \[\] : oops$'])
|
||||
|
||||
def testAssertNotIn(self):
|
||||
self.assertMessages('assertNotIn', (None, [None]),
|
||||
['^None unexpectedly found in \[None\]$', "^oops$",
|
||||
'^None unexpectedly found in \[None\]$',
|
||||
'^None unexpectedly found in \[None\] : oops$'])
|
||||
[r'^None unexpectedly found in \[None\]$', "^oops$",
|
||||
r'^None unexpectedly found in \[None\]$',
|
||||
r'^None unexpectedly found in \[None\] : oops$'])
|
||||
|
||||
def testAssertDictEqual(self):
|
||||
self.assertMessages('assertDictEqual', ({}, {'key': 'value'}),
|
||||
[r"\+ \{'key': 'value'\}$", "^oops$",
|
||||
"\+ \{'key': 'value'\}$",
|
||||
"\+ \{'key': 'value'\} : oops$"])
|
||||
r"\+ \{'key': 'value'\}$",
|
||||
r"\+ \{'key': 'value'\} : oops$"])
|
||||
|
||||
def testAssertDictContainsSubset(self):
|
||||
with warnings.catch_warnings():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue