fix(python3): super() backward compatibility fix

This commit is contained in:
Aditya Hase 2019-03-08 12:24:02 +05:30
parent a873a19094
commit e358841d3c

View file

@ -95,13 +95,13 @@ def set_test_email_config():
class TimeLoggingTestResult(unittest.TextTestResult):
def startTest(self, test):
self._started_at = time.time()
super().startTest(test)
super(TimeLoggingTestResult, self).startTest(test)
def addSuccess(self, test):
elapsed = time.time() - self._started_at
name = self.getDescription(test)
self.stream.write("\n{} ({:.03}s)\n".format(name, elapsed))
super().addSuccess(test)
super(TimeLoggingTestResult, self).addSuccess(test)
def run_all_tests(app=None, verbose=False, profile=False, ui_tests=False, failfast=False):