8000 gh-124245: Fix UserWarning in test_argparse (GH-124246) · python/cpython@992e8f6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 992e8f6

Browse files
gh-124245: Fix UserWarning in test_argparse (GH-124246)
1 parent 7331d0f commit 992e8f6

Fil 8000 e tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Lib/test/test_argparse.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5811,9 +5811,8 @@ def test_invalid_args(self):
58115811
parser = ErrorRaisingArgumentParser(prog='PROG')
58125812
parser.add_argument('--foo', nargs="*")
58135813
parser.add_argument('foo')
5814-
with captured_stderr() as stderr:
5814+
with self.assertWarns(UserWarning):
58155815
parser.parse_intermixed_args(['hello', '--foo'])
5816-
self.assertIn("UserWarning", stderr.getvalue())
58175816

58185817
class TestIntermixedMessageContentError(TestCase):
58195818
# case where Intermixed gives different error message

0 commit comments

Comments
 (0)
0