[Python-checkins] cpython (3.4): #11955: show the list of args in case of error in test_argparse.

ezio.melotti python-checkins at python.org
Tue Aug 5 01:24:53 CEST 2014


http://hg.python.org/cpython/rev/9a410ae785ff
changeset:   91999:9a410ae785ff
branch:      3.4
parent:      91996:815f1a69283e
user:        Ezio Melotti <ezio.melotti at gmail.com>
date:        Tue Aug 05 02:24:03 2014 +0300
summary:
  #11955: show the list of args in case of error in test_argparse.

files:
  Lib/test/test_argparse.py |  4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Lib/test/test_argparse.py b/Lib/test/test_argparse.py
--- a/Lib/test/test_argparse.py
+++ b/Lib/test/test_argparse.py
@@ -235,8 +235,8 @@
                 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)

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list