Example #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)
Example #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)
Example #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)
Example #4
0
 def addError(self, test, error):
     """Show the log and forward the error."""
     self._show_the_logs()
     TestResultDecorator.addError(self, test, error)
Example #5
0
 def addFailure(self, test, fail):
     """Show the log and forward the failure."""
     self._show_the_logs()
     TestResultDecorator.addFailure(self, test, fail)
Example #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)
Example #7
0
 def addError(self, test, error):
     """Show the log and forward the error."""
     self._show_the_logs()
     TestResultDecorator.addError(self, test, error)
Example #8
0
 def addFailure(self, test, fail):
     """Show the log and forward the failure."""
     self._show_the_logs()
     TestResultDecorator.addFailure(self, test, fail)