Skip to content

Commit

Permalink
fix: simplify logic by avoiding classes
Browse files Browse the repository at this point in the history
  • Loading branch information
jbergstroem committed Jul 13, 2015
1 parent 9cd5da6 commit 3749544
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,13 @@ def HasRun(self, output):
logger.info('#' + l)
for l in output.output.stdout.splitlines():
logger.info('#' + l)
elif output.HasSkipped():
skip = skip_regex.search(output.output.stdout).group(1)
logger.info('ok %i - %s # skip %s' % (self._done, command, skip))
else:
logger.info('ok %i - %s' % (self._done, command))
skip = skip_regex.search(output.output.stdout)
if skip:
logger.info('ok %i - %s # skip %s' %
(self._done, command, skip.group(1)))
else:
logger.info('ok %i - %s' % (self._done, command))

duration = output.test.duration

Expand Down Expand Up @@ -475,10 +477,6 @@ def UnexpectedOutput(self):
outcome = PASS
return not outcome in self.test.outcomes

def HasSkipped(self):
skip = skip_regex.search(self.output.stdout)
return self.store_unexpected_output and skip

def HasPreciousOutput(self):
return self.UnexpectedOutput() and self.store_unexpected_output

Expand Down

0 comments on commit 3749544

Please sign in to comment.