summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_regrtest.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-10-02 22:21:12 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-10-02 22:21:12 (GMT)
commit5f9d3acc5e8050a43c79cf4d2a373be67f3c27fc (patch)
tree38cd00f188c164439d001c5ea91251fd6227f717 /Lib/test/test_regrtest.py
parent076fc872bca0f3aa4e6140021e5c05fc4360e82a (diff)
downloadcpython-5f9d3acc5e8050a43c79cf4d2a373be67f3c27fc.zip
cpython-5f9d3acc5e8050a43c79cf4d2a373be67f3c27fc.tar.gz
cpython-5f9d3acc5e8050a43c79cf4d2a373be67f3c27fc.tar.bz2
Issue #22806: Add ``python -m test --list-tests`` command to list tests.
Diffstat (limited to 'Lib/test/test_regrtest.py')
-rw-r--r--Lib/test/test_regrtest.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py
index 8b2449a..e15e724 100644
--- a/Lib/test/test_regrtest.py
+++ b/Lib/test/test_regrtest.py
@@ -672,6 +672,13 @@ class ArgsTestCase(BaseTestCase):
reflog = fp.read()
self.assertEqual(reflog, line2)
+ def test_list_tests(self):
+ # test --list-tests
+ tests = [self.create_test() for i in range(5)]
+ output = self.run_tests('--list-tests', *tests)
+ self.assertEqual(output.rstrip().splitlines(),
+ tests)
+
if __name__ == '__main__':
unittest.main()