Show More
@@ -1,9 +1,15 b'' | |||
|
1 | 1 | from __future__ import absolute_import, print_function |
|
2 | 2 | |
|
3 | import sys | |
|
3 | 4 | import unittest |
|
4 | 5 | |
|
6 | if sys.version_info[0] < 3: | |
|
7 | base_class = unittest._TextTestResult | |
|
8 | else: | |
|
9 | base_class = unittest.TextTestResult | |
|
5 | 10 | |
|
6 | class TestResult(unittest._TextTestResult): | |
|
11 | ||
|
12 | class TestResult(base_class): | |
|
7 | 13 | def __init__(self, options, *args, **kwargs): |
|
8 | 14 | super(TestResult, self).__init__(*args, **kwargs) |
|
9 | 15 | self._options = options |
@@ -2233,12 +2233,15 b' iolock = threading.RLock()' | |||
|
2233 | 2233 | firstlock = threading.RLock() |
|
2234 | 2234 | firsterror = False |
|
2235 | 2235 | |
|
2236 | ||
|
2237 |
class |
|
|
2236 | if PYTHON3: | |
|
2237 | base_class = unittest.TextTestResult | |
|
2238 | else: | |
|
2239 | base_class = unittest._TextTestResult | |
|
2240 | ||
|
2241 | ||
|
2242 | class TestResult(base_class): | |
|
2238 | 2243 | """Holds results when executing via unittest.""" |
|
2239 | 2244 | |
|
2240 | # Don't worry too much about accessing the non-public _TextTestResult. | |
|
2241 | # It is relatively common in Python testing tools. | |
|
2242 | 2245 | def __init__(self, options, *args, **kwargs): |
|
2243 | 2246 | super(TestResult, self).__init__(*args, **kwargs) |
|
2244 | 2247 |
General Comments 0
You need to be logged in to leave comments.
Login now