Skip to content

Commit 3749544

Browse files
committed
fix: simplify logic by avoiding classes
1 parent 9cd5da6 commit 3749544

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

tools/test.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,13 @@ def HasRun(self, output):
256256
logger.info('#' + l)
257257
for l in output.output.stdout.splitlines():
258258
logger.info('#' + l)
259-
elif output.HasSkipped():
260-
skip = skip_regex.search(output.output.stdout).group(1)
261-
logger.info('ok %i - %s # skip %s' % (self._done, command, skip))
262259
else:
263-
logger.info('ok %i - %s' % (self._done, command))
260+
skip = skip_regex.search(output.output.stdout)
261+
if skip:
262+
logger.info('ok %i - %s # skip %s' %
263+
(self._done, command, skip.group(1)))
264+
else:
265+
logger.info('ok %i - %s' % (self._done, command))
264266

265267
duration = output.test.duration
266268

@@ -475,10 +477,6 @@ def UnexpectedOutput(self):
475477
outcome = PASS
476478
return not outcome in self.test.outcomes
477479

478-
def HasSkipped(self):
479-
skip = skip_regex.search(self.output.stdout)
480-
return self.store_unexpected_output and skip
481-
482480
def HasPreciousOutput(self):
483481
return self.UnexpectedOutput() and self.store_unexpected_output
484482

0 commit comments

Comments
 (0)