Exemple #1
0
 def __init__(self, name, result, **params):
     '''
     Initializes the channel and ties it with provided ResultChannelHelper
     instance.
     '''
     TestResultChannel.__init__(self, name, **params)
     self._result = result
Exemple #2
0
 def stopTest(self, result, device):
     """
     Signals stop of execution of a test.
     """
     TestResultChannel.stopTest(self, result, device)
     if self.isEnabled():
         self._console.stopTest(result, device)
Exemple #3
0
 def __init__(self, name, progress, **params):
     '''
     Initializes the channel and ties it with provided ProgressChannelHelper
     instance.
     '''
     TestResultChannel.__init__(self, name, **params)
     self._progress = progress
 def __init__(self, name, progress, **params):
     '''
     Initializes the channel and ties it with provided ProgressChannelHelper
     instance.
     '''
     TestResultChannel.__init__(self, name, **params)
     self._progress = progress
Exemple #5
0
 def start(self, result):
     """
     Signals start of execution of tests.
     """
     TestResultChannel.start(self, result)
     if self.isEnabled():
         self._console.start(result)
 def __init__(self, name, result, **params):
     '''
     Initializes the channel and ties it with provided ResultChannelHelper
     instance.
     '''
     TestResultChannel.__init__(self, name, **params)
     self._result = result
Exemple #7
0
 def startTest(self, result, device):
     '''
     Processes a test start execution for the summary channel.
     '''
     TestResultChannel.startTest(self, result, device)
     if isinstance(result, TestCaseResult):
         self._counters[STATUS_NOT_COMPLETED] += 1
         self._counters[COUNTER_TESTS_RUN] += 1
Exemple #8
0
 def startTest(self, result, device):
     '''
     Processes a test start execution for the summary channel.
     '''
     TestResultChannel.startTest(self, result, device)
     if isinstance(result, TestCaseResult):
         self._counters[STATUS_NOT_COMPLETED] += 1
         self._counters[COUNTER_TESTS_RUN] += 1
 def startTest(self, result, device):
     '''
     Processes a test start execution for the stream channel.
     '''
     TestResultChannel.startTest(self, result, device)
     formatters = (self._verboseFormats if self.isVerbose()
                                        else self._simpleFormats)
     self.write(self._format(result, formatters["start"], formatters,
                             self._deviceAttrs(device)))
     self.write(self._formatResult(result, formatters,
                                   self._deviceAttrs(device)))
Exemple #10
0
 def stopTest(self, result, device):
     '''
     Processes a test stop execution for the summary channel.
     '''
     TestResultChannel.stopTest(self, result, device)
     if isinstance(result, TestCaseResult):
         self._counters[STATUS_NOT_COMPLETED] -= 1
         self._counters[device.status] += 1
         self._counters[_STOP_STAMP] = time.time()
     if device.cores:
         self._counters[COUNTER_CORE_DUMPS] += len(device.cores)
Exemple #11
0
 def stopTest(self, result, device):
     '''
     Processes a test stop execution for the summary channel.
     '''
     TestResultChannel.stopTest(self, result, device)
     if isinstance(result, TestCaseResult):
         self._counters[STATUS_NOT_COMPLETED] -= 1
         self._counters[device.status] += 1
         self._counters[_STOP_STAMP] = time.time()
     if device.cores:
         self._counters[COUNTER_CORE_DUMPS] += len(device.cores)
 def stopTest(self, result, device):
     '''
     Processes a test stop execution for the stream channel.
     '''
     TestResultChannel.stopTest(self, result, device)
     formatters = (self._verboseFormats if self.isVerbose()
                                        else self._simpleFormats)
     self.write(self._format(result, formatters["stop"], formatters,
                             self._deviceAttrs(device)))
     self.write(self._formatResult(result, formatters,
                                   self._deviceAttrs(device)))
     self.write(self._format(device.cores, formatters["cores"],
                             formatters, self._basicAttrs(device)))
     self.write(self._format(device.errors, formatters["errors"],
                             formatters, self._basicAttrs(device)))
Exemple #13
0
 def start(self, result):
     '''
     Initializes all the channel counters.
     '''
     TestResultChannel.start(self, result)
     stamp = time.time()
     self._counters = {
         _START_STAMP: stamp,
         _STOP_STAMP: stamp,
         COUNTER_N_TESTS: _countCaseResults(result),
         COUNTER_TESTS_RUN: 0,
         COUNTER_CORE_DUMPS: 0
     }
     for status in STATUS_COUNTERS:
         self._counters[status] = 0
Exemple #14
0
 def start(self, result):
     '''
     Initializes all the channel counters.
     '''
     TestResultChannel.start(self, result)
     stamp = time.time()
     self._counters = {
         _START_STAMP: stamp,
         _STOP_STAMP: stamp,
         COUNTER_N_TESTS: _countCaseResults(result),
         COUNTER_TESTS_RUN: 0,
         COUNTER_CORE_DUMPS: 0
     }
     for status in STATUS_COUNTERS:
         self._counters[status] = 0
 def startTest(self, result, device):
     '''
     Signals start of execution of a test.
     '''
     TestResultChannel.startTest(self, result, device)
     self._progress.startTest(result, device)
 def __init__(self, name, stream=None, encoding=None, **params):
     TestResultChannel.__init__(self, name, **params)
     self._stream = stream or sys.stderr
     self._encoding = encoding or getattr(self._stream, "encoding", None)
 def stopTest(self, result, device):
     '''
     Signals stop of execution of a test.
     '''
     TestResultChannel.stopTest(self, result, device)
     self._result.stopTest(result, device)
Exemple #18
0
 def stop(self):
     '''
     Signals stop of execution of tests.
     '''
     TestResultChannel.stop(self)
     self._result.stop()
Exemple #19
0
 def stopTest(self, result, device):
     '''
     Signals stop of execution of a test.
     '''
     TestResultChannel.stopTest(self, result, device)
     self._result.stopTest(result, device)
Exemple #20
0
 def __init__(self, name, enabled=True, verbose=False, **params):
     TestResultChannel.__init__(self, name, enabled, verbose, **params)
     self._counters = {}
Exemple #21
0
 def __init__(self, name, enabled=True, verbose=False, **params):
     TestResultChannel.__init__(self, name, enabled, verbose, **params)
     self._counters = {}
Exemple #22
0
 def startTest(self, result, device):
     '''
     Signals start of execution of a test.
     '''
     TestResultChannel.startTest(self, result, device)
     self._progress.startTest(result, device)
Exemple #23
0
 def __init__(self, name, console, **params):
     TestResultChannel.__init__(self, name, **params)
     self._console = console
 def stop(self):
     '''
     Signals stop of execution of tests.
     '''
     TestResultChannel.stop(self)
     self._result.stop()
 def start(self, result):
     '''
     Signals start of execution of tests.
     '''
     TestResultChannel.start(self, result)
     self._result.start(result)
Exemple #26
0
 def start(self, result):
     '''
     Signals start of execution of tests.
     '''
     TestResultChannel.start(self, result)
     self._result.start(result)