summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_regrtest.py
diff options
context:
space:
mode:
authorChris Jerdonek <chris.jerdonek@gmail.com>2013-01-08 01:07:32 (GMT)
committerChris Jerdonek <chris.jerdonek@gmail.com>2013-01-08 01:07:32 (GMT)
commit15738427f612a447475254d0ac26ce4b4bb9ef2e (patch)
treee9c81d26cfc4b860eec4c93ff770c3e7ffe352b5 /Lib/test/test_regrtest.py
parent2716d531a1e2553bc6df43852357053370ff8bb0 (diff)
downloadcpython-15738427f612a447475254d0ac26ce4b4bb9ef2e.zip
cpython-15738427f612a447475254d0ac26ce4b4bb9ef2e.tar.gz
cpython-15738427f612a447475254d0ac26ce4b4bb9ef2e.tar.bz2
Issue #16854: Fix regrtest.usage() regression introduced in 6e2e5adc0400.
This fixes a regression introduced in the commit for issue #15302, which switched regrtest from getopt to argparse.
Diffstat (limited to 'Lib/test/test_regrtest.py')
-rw-r--r--Lib/test/test_regrtest.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py
index 40d0f97..5b972ca 100644
--- a/Lib/test/test_regrtest.py
+++ b/Lib/test/test_regrtest.py
@@ -23,10 +23,14 @@ def old_parse_args(args):
class ParseArgsTestCase(unittest.TestCase):
- """Test that regrtest._parse_args() matches the prior getopt behavior."""
+ """Test that regrtest's parsing code matches the prior getopt behavior."""
def _parse_args(self, args):
- return regrtest._parse_args(args=args)
+ # This is the same logic as that used in regrtest.main()
+ parser = regrtest._create_parser()
+ ns = parser.parse_args(args=args)
+ opts = regrtest._convert_namespace_to_getopt(ns)
+ return opts, ns.args
def _check_args(self, args, expected=None):
"""