We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7331d0f commit 992e8f6Copy full SHA for 992e8f6
Lib/test/test_argparse.py
@@ -5811,9 +5811,8 @@ def test_invalid_args(self):
5811
parser = ErrorRaisingArgumentParser(prog='PROG')
5812
parser.add_argument('--foo', nargs="*")
5813
parser.add_argument('foo')
5814
- with captured_stderr() as stderr:
+ with self.assertWarns(UserWarning):
5815
parser.parse_intermixed_args(['hello', '--foo'])
5816
- self.assertIn("UserWarning", stderr.getvalue())
5817
5818
class TestIntermixedMessageContentError(TestCase):
5819
# case where Intermixed gives different error message
0 commit comments