mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
[3.13] gh-124245: Fix UserWarning in test_argparse (GH-124246) (#124255)
gh-124245: Fix UserWarning in test_argparse (GH-124246)
(cherry picked from commit 992e8f6102
)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
parent
dbfc37a5f8
commit
dceac5b8ea
1 changed files with 1 additions and 2 deletions
|
@ -5874,9 +5874,8 @@ class TestIntermixedArgs(TestCase):
|
|||
parser = ErrorRaisingArgumentParser(prog='PROG')
|
||||
parser.add_argument('--foo', nargs="*")
|
||||
parser.add_argument('foo')
|
||||
with captured_stderr() as stderr:
|
||||
with self.assertWarns(UserWarning):
|
||||
parser.parse_intermixed_args(['hello', '--foo'])
|
||||
self.assertIn("UserWarning", stderr.getvalue())
|
||||
|
||||
class TestIntermixedMessageContentError(TestCase):
|
||||
# case where Intermixed gives different error message
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue