mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +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
|
@ -533,21 +533,21 @@ class SkipitemTest(unittest.TestCase):
|
|||
parse((1, 2, 3), {}, b'OOO', ['', '', 'a'])
|
||||
parse((1, 2), {'a': 3}, b'OOO', ['', '', 'a'])
|
||||
with self.assertRaisesRegex(TypeError,
|
||||
'Function takes at least 2 positional arguments \(1 given\)'):
|
||||
r'Function takes at least 2 positional arguments \(1 given\)'):
|
||||
parse((1,), {'a': 3}, b'OOO', ['', '', 'a'])
|
||||
parse((1,), {}, b'O|OO', ['', '', 'a'])
|
||||
with self.assertRaisesRegex(TypeError,
|
||||
'Function takes at least 1 positional arguments \(0 given\)'):
|
||||
r'Function takes at least 1 positional arguments \(0 given\)'):
|
||||
parse((), {}, b'O|OO', ['', '', 'a'])
|
||||
parse((1, 2), {'a': 3}, b'OO$O', ['', '', 'a'])
|
||||
with self.assertRaisesRegex(TypeError,
|
||||
'Function takes exactly 2 positional arguments \(1 given\)'):
|
||||
r'Function takes exactly 2 positional arguments \(1 given\)'):
|
||||
parse((1,), {'a': 3}, b'OO$O', ['', '', 'a'])
|
||||
parse((1,), {}, b'O|O$O', ['', '', 'a'])
|
||||
with self.assertRaisesRegex(TypeError,
|
||||
'Function takes at least 1 positional arguments \(0 given\)'):
|
||||
r'Function takes at least 1 positional arguments \(0 given\)'):
|
||||
parse((), {}, b'O|O$O', ['', '', 'a'])
|
||||
with self.assertRaisesRegex(SystemError, 'Empty parameter name after \$'):
|
||||
with self.assertRaisesRegex(SystemError, r'Empty parameter name after \$'):
|
||||
parse((1,), {}, b'O|$OO', ['', '', 'a'])
|
||||
with self.assertRaisesRegex(SystemError, 'Empty keyword'):
|
||||
parse((1,), {}, b'O|OO', ['', 'a', ''])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue