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