[Python-checkins] gh-92514: Remove unused test.support.BasicTestRunner (#92515)

JelleZijlstra webhook-mailer at python.org
Thu May 12 10:24:08 EDT 2022


https://github.com/python/cpython/commit/8a0d9a6bb77a72cd8b9ece01b7c1163fff28029a
commit: 8a0d9a6bb77a72cd8b9ece01b7c1163fff28029a
branch: main
author: Jelle Zijlstra <jelle.zijlstra at gmail.com>
committer: JelleZijlstra <jelle.zijlstra at gmail.com>
date: 2022-05-12T07:24:04-07:00
summary:

gh-92514: Remove unused test.support.BasicTestRunner (#92515)

files:
A Misc/NEWS.d/next/Tests/2022-05-08-15-40-41.gh-issue-92514.Xbf5JY.rst
M Doc/library/test.rst
M Lib/test/support/__init__.py

diff --git a/Doc/library/test.rst b/Doc/library/test.rst
index 699db14596f25..707e966455ceb 100644
--- a/Doc/library/test.rst
+++ b/Doc/library/test.rst
@@ -980,13 +980,6 @@ The :mod:`test.support` module defines the following classes:
       Try to match a single stored value (*dv*) with a supplied value (*v*).
 
 
-.. class:: BasicTestRunner()
-
-   .. method:: run(test)
-
-      Run *test* and return the result.
-
-
 :mod:`test.support.socket_helper` --- Utilities for socket tests
 ================================================================
 
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index 3b2f33979db9a..41502cf4e97be 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -36,7 +36,7 @@
     "is_resource_enabled", "requires", "requires_freebsd_version",
     "requires_linux_version", "requires_mac_ver",
     "check_syntax_error",
-    "BasicTestRunner", "run_unittest", "run_doctest",
+    "run_unittest", "run_doctest",
     "requires_gzip", "requires_bz2", "requires_lzma",
     "bigmemtest", "bigaddrspacetest", "cpython_only", "get_attribute",
     "requires_IEEE_754", "requires_zlib",
@@ -983,12 +983,6 @@ def wrapper(self):
 #=======================================================================
 # unittest integration.
 
-class BasicTestRunner:
-    def run(self, test):
-        result = unittest.TestResult()
-        test(result)
-        return result
-
 def _id(obj):
     return obj
 
diff --git a/Misc/NEWS.d/next/Tests/2022-05-08-15-40-41.gh-issue-92514.Xbf5JY.rst b/Misc/NEWS.d/next/Tests/2022-05-08-15-40-41.gh-issue-92514.Xbf5JY.rst
new file mode 100644
index 0000000000000..6b82196a25e40
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2022-05-08-15-40-41.gh-issue-92514.Xbf5JY.rst
@@ -0,0 +1 @@
+Remove unused ``test.support.BasicTestRunner``. Patch by Jelle Zijlstra.



More information about the Python-checkins mailing list