Changeset View
Changeset View
Standalone View
Standalone View
tests/run-tests.py
Show First 20 Lines • Show All 2227 Lines • ▼ Show 20 Line(s) | class TTest(Test): | ||||
def _stringescape(s): | def _stringescape(s): | ||||
return TTest.ESCAPESUB(TTest._escapef, s) | return TTest.ESCAPESUB(TTest._escapef, s) | ||||
iolock = threading.RLock() | iolock = threading.RLock() | ||||
firstlock = threading.RLock() | firstlock = threading.RLock() | ||||
firsterror = False | firsterror = False | ||||
if PYTHON3: | |||||
base_class = unittest.TextTestResult | |||||
else: | |||||
base_class = unittest._TextTestResult | |||||
class TestResult(unittest._TextTestResult): | class TestResult(base_class): | ||||
"""Holds results when executing via unittest.""" | """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): | def __init__(self, options, *args, **kwargs): | ||||
super(TestResult, self).__init__(*args, **kwargs) | super(TestResult, self).__init__(*args, **kwargs) | ||||
self._options = options | self._options = options | ||||
# unittest.TestResult didn't have skipped until 2.7. We need to | # unittest.TestResult didn't have skipped until 2.7. We need to | ||||
# polyfill it. | # polyfill it. | ||||
self.skipped = [] | self.skipped = [] | ||||
▲ Show 20 Lines • Show All 1818 Lines • Show Last 20 Lines |