summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_argparse.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_argparse.py')
-rw-r--r--Lib/test/test_argparse.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/test/test_argparse.py b/Lib/test/test_argparse.py
index 584462b..435db65 100644
--- a/Lib/test/test_argparse.py
+++ b/Lib/test/test_argparse.py
@@ -5811,9 +5811,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