diff options
| author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-09-30 01:07:04 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-30 01:07:04 (GMT) |
| commit | dceac5b8ea064671aa07b6cb35842955684555f1 (patch) | |
| tree | cc3c5ea34d066ee6f57e254d2ef774c2ddf157eb | |
| parent | dbfc37a5f86196c642e63aee91be70752ad8604c (diff) | |
| download | cpython-dceac5b8ea064671aa07b6cb35842955684555f1.zip cpython-dceac5b8ea064671aa07b6cb35842955684555f1.tar.gz cpython-dceac5b8ea064671aa07b6cb35842955684555f1.tar.bz2 | |
[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 992e8f6102e317b4967a762fbefea82f9fcf9dfb)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
| -rw-r--r-- | Lib/test/test_argparse.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/test/test_argparse.py b/Lib/test/test_argparse.py index 753a8da..eb74446 100644 --- a/Lib/test/test_argparse.py +++ b/Lib/test/test_argparse.py @@ -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 |
