Esempio n. 1
0
 def __init__(self, *a, **k):
     self._logs_positions = {}
     cwd = os.getcwd()
     self._abspath_logs = [
         os.path.join(cwd, ll) for ll in self._logs_to_show
     ]
     TestResultDecorator.__init__(self, *a, **k)
Esempio n. 2
0
 def startTest(self, test):
     """Record the logs positions when the test starts."""
     for log in self._abspath_logs:
         if os.path.exists(log):
             self._logs_positions[log] = os.stat(log).st_size
         else:
             self._logs_positions[log] = 0
     TestResultDecorator.startTest(self, test)
Esempio n. 3
0
 def startTest(self, test):
     """Record the logs positions when the test starts."""
     for log in self._abspath_logs:
         if os.path.exists(log):
             self._logs_positions[log] = os.stat(log).st_size
         else:
             self._logs_positions[log] = 0
     TestResultDecorator.startTest(self, test)
Esempio n. 4
0
 def addError(self, test, error):
     """Show the log and forward the error."""
     self._show_the_logs()
     TestResultDecorator.addError(self, test, error)
Esempio n. 5
0
 def addFailure(self, test, fail):
     """Show the log and forward the failure."""
     self._show_the_logs()
     TestResultDecorator.addFailure(self, test, fail)
Esempio n. 6
0
 def __init__(self, *a, **k):
     self._logs_positions = {}
     cwd = os.getcwd()
     self._abspath_logs = [os.path.join(cwd, l) for l in self._logs_to_show]
     TestResultDecorator.__init__(self, *a, **k)
Esempio n. 7
0
 def addError(self, test, error):
     """Show the log and forward the error."""
     self._show_the_logs()
     TestResultDecorator.addError(self, test, error)
Esempio n. 8
0
 def addFailure(self, test, fail):
     """Show the log and forward the failure."""
     self._show_the_logs()
     TestResultDecorator.addFailure(self, test, fail)