Factor out common code from lib/test/__main__.py and lib/test/regrtest.py into a function.
diff --git a/Misc/NEWS b/Misc/NEWS
index 7796b2f..07a62ee 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -206,6 +206,9 @@
 - regrtest.py once again ensures the test directory is removed from sys.path
   when it is invoked directly as the __main__ module
 
+- `python -m test` can be used to run the test suite as well as
+  `python -m test.regrtest`.
+
 - Issue #9424: Deprecate the `unittest.TestCase` methods `assertEquals`,
   `assertNotEquals`, `assertAlmostEquals`, `assertNotAlmostEquals` and `assert_`
   and replace them with the correct methods in the Python test suite.