diff tests/run-tests.py @ 48281:96aa3a68d3b5

branching: merge stable into default
author Rapha?l Gom?s <rgomes@octobus.net>
date Thu, 21 Oct 2021 17:25:41 +0200
parents a28a7dcb9158 3a95a4e660b9
children b7fde9237c92
line wrap: on
line diff
--- 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)