summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_argparse.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2014-08-04 23:24:03 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2014-08-04 23:24:03 (GMT)
commit12b7f4821612a01aea6ac904d9b5f039e2d042eb (patch)
tree60202563c1c2d9c129866114dafdfe8e7080036b /Lib/test/test_argparse.py
parente4aad5ab3242f2a346b2c86ff84e19d96e7a7b88 (diff)
downloadcpython-12b7f4821612a01aea6ac904d9b5f039e2d042eb.zip
cpython-12b7f4821612a01aea6ac904d9b5f039e2d042eb.tar.gz
cpython-12b7f4821612a01aea6ac904d9b5f039e2d042eb.tar.bz2
#11955: show the list of args in case of error in test_argparse.
Diffstat (limited to 'Lib/test/test_argparse.py')
-rw-r--r--Lib/test/test_argparse.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_argparse.py b/Lib/test/test_argparse.py
index 8a4fdb9..b615722 100644
--- a/Lib/test/test_argparse.py
+++ b/Lib/test/test_argparse.py
@@ -235,8 +235,8 @@ class ParserTesterMetaclass(type):
parser = self._get_parser(tester)
for args_str in tester.failures:
args = args_str.split()
- raises = tester.assertRaises
- raises(ArgumentParserError, parser.parse_args, args)
+ with tester.assertRaises(ArgumentParserError, msg=args):
+ parser.parse_args(args)
def test_successes(self, tester):
parser = self._get_parser(tester)