Ejemplo n.º 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
Ejemplo n.º 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)
Ejemplo n.º 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
Ejemplo n.º 4
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
Ejemplo n.º 5
0
 def start(self, result):
     """
     Signals start of execution of tests.
     """
     TestResultChannel.start(self, result)
     if self.isEnabled():
         self._console.start(result)
Ejemplo n.º 6
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
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 9
0
 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)))
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 12
0
 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)))
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 15
0
 def startTest(self, result, device):
     '''
     Signals start of execution of a test.
     '''
     TestResultChannel.startTest(self, result, device)
     self._progress.startTest(result, device)
Ejemplo n.º 16
0
 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)
Ejemplo n.º 17
0
 def stopTest(self, result, device):
     '''
     Signals stop of execution of a test.
     '''
     TestResultChannel.stopTest(self, result, device)
     self._result.stopTest(result, device)
Ejemplo n.º 18
0
 def stop(self):
     '''
     Signals stop of execution of tests.
     '''
     TestResultChannel.stop(self)
     self._result.stop()
Ejemplo n.º 19
0
 def stopTest(self, result, device):
     '''
     Signals stop of execution of a test.
     '''
     TestResultChannel.stopTest(self, result, device)
     self._result.stopTest(result, device)
Ejemplo n.º 20
0
 def __init__(self, name, enabled=True, verbose=False, **params):
     TestResultChannel.__init__(self, name, enabled, verbose, **params)
     self._counters = {}
Ejemplo n.º 21
0
 def __init__(self, name, enabled=True, verbose=False, **params):
     TestResultChannel.__init__(self, name, enabled, verbose, **params)
     self._counters = {}
Ejemplo n.º 22
0
 def startTest(self, result, device):
     '''
     Signals start of execution of a test.
     '''
     TestResultChannel.startTest(self, result, device)
     self._progress.startTest(result, device)
Ejemplo n.º 23
0
 def __init__(self, name, console, **params):
     TestResultChannel.__init__(self, name, **params)
     self._console = console
Ejemplo n.º 24
0
 def stop(self):
     '''
     Signals stop of execution of tests.
     '''
     TestResultChannel.stop(self)
     self._result.stop()
Ejemplo n.º 25
0
 def start(self, result):
     '''
     Signals start of execution of tests.
     '''
     TestResultChannel.start(self, result)
     self._result.start(result)
Ejemplo n.º 26
0
 def start(self, result):
     '''
     Signals start of execution of tests.
     '''
     TestResultChannel.start(self, result)
     self._result.start(result)