Commit 7595dcbc authored by Mathieu Giraud's avatar Mathieu Giraud

src/should.py: refactor, move methods

parent 94e9f39c
......@@ -777,20 +777,6 @@ class TestSuite():
this_cmd_continues = next_cmd_continues
def print_stderr(self, colorize=True):
print(' stdout --> %s lines' % len(self.stdout))
print(' stderr --> %s lines' % len(self.stderr))
print(color(ANSI.CYAN, ''.join(self.stderr), colorize))
def skip_all(self, reason, verbose=1):
if verbose > 0:
print('Skipping tests: %s' % reason)
for test in self.tests:
test.status = SKIP
self.stats.up(test.status)
self.status = SKIP
def test(self, variables=[], verbose=0, colorize=True, only=None):
self.only = only
......@@ -885,6 +871,19 @@ class TestSuite():
if verbose > 0 or test.status in WARN_STATUS:
print(test.str(colorize))
def print_stderr(self, colorize=True):
print(' stdout --> %s lines' % len(self.stdout))
print(' stderr --> %s lines' % len(self.stderr))
print(color(ANSI.CYAN, ''.join(self.stderr), colorize))
def skip_all(self, reason, verbose=1):
if verbose > 0:
print('Skipping tests: %s' % reason)
for test in self.tests:
test.status = SKIP
self.stats.up(test.status)
self.status = SKIP
def debug(self, status, cmd, test_lines, verbose, colorize):
if status in FAIL_STATUS and verbose <= 0:
print(color(ANSI.MAGENTA, cmd, colorize))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment