--- 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)