tests/run-tests.py
changeset 48281 96aa3a68d3b5
parent 47950 a28a7dcb9158
parent 47898 3a95a4e660b9
child 48384 b7fde9237c92
--- a/tests/run-tests.py	Thu Oct 21 11:21:21 2021 +0200
+++ b/tests/run-tests.py	Thu Oct 21 17:25:41 2021 +0200
@@ -2235,12 +2235,15 @@
 firstlock = threading.RLock()
 firsterror = False
 
-
-class TestResult(unittest._TextTestResult):
+if PYTHON3:
+    base_class = unittest.TextTestResult
+else:
+    base_class = unittest._TextTestResult
+
+
+class TestResult(base_class):
     """Holds results when executing via unittest."""
 
-    # Don't worry too much about accessing the non-public _TextTestResult.
-    # It is relatively common in Python testing tools.
     def __init__(self, options, *args, **kwargs):
         super(TestResult, self).__init__(*args, **kwargs)