summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_regrtest.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-01-03 00:38:58 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2017-01-03 00:38:58 (GMT)
commite8cfec5abc8a9401543aa4af5b20ae7afec89198 (patch)
treec773fe9df0c7f2f6dc013f392199e34c448f9408 /Lib/test/test_regrtest.py
parentc9c760d6ecacfd08f0ec55ebb7ac54757372d3c5 (diff)
downloadcpython-e8cfec5abc8a9401543aa4af5b20ae7afec89198.zip
cpython-e8cfec5abc8a9401543aa4af5b20ae7afec89198.tar.gz
cpython-e8cfec5abc8a9401543aa4af5b20ae7afec89198.tar.bz2
Issue #29035: Simplify a regex in libregrtest
regrtest: simplify the regex used to match test names for the --fromfile command line option.
Diffstat (limited to 'Lib/test/test_regrtest.py')
-rw-r--r--Lib/test/test_regrtest.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py
index 751df15..6d70e4d 100644
--- a/Lib/test/test_regrtest.py
+++ b/Lib/test/test_regrtest.py
@@ -676,6 +676,14 @@ class ArgsTestCase(BaseTestCase):
output = self.run_tests('--fromfile', filename)
self.check_executed_tests(output, tests)
+ # test format 'Lib/test/test_opcodes.py'
+ with open(filename, "w") as fp:
+ for name in tests:
+ print('Lib/test/%s.py' % name, file=fp)
+
+ output = self.run_tests('--fromfile', filename)
+ self.check_executed_tests(output, tests)
+
def test_interrupted(self):
code = TEST_INTERRUPTED
test = self.create_test('sigint', code=code)