Commit ec6372a4 authored by Jérome Perrin's avatar Jérome Perrin

tests: runs sequence tests quietly by default

parent 50c64297
...@@ -75,7 +75,7 @@ class Step: ...@@ -75,7 +75,7 @@ class Step:
self._required = required self._required = required
self._max_replay = max_replay self._max_replay = max_replay
def play(self, context, sequence=None, quiet=0): def play(self, context, sequence=None, quiet=1):
method_name = 'step' + self._method_name method_name = 'step' + self._method_name
method = getattr(context,method_name) method = getattr(context,method_name)
# We can in same cases replay many times the same step, # We can in same cases replay many times the same step,
...@@ -116,7 +116,7 @@ class Sequence: ...@@ -116,7 +116,7 @@ class Sequence:
line_list.append(' %s' % step._method_name) line_list.append(' %s' % step._method_name)
return '\n'.join(line_list) return '\n'.join(line_list)
def play(self, context, sequence=None, sequence_number=0, quiet=0): def play(self, context, sequence=None, sequence_number=0, quiet=1):
if not quiet: if not quiet:
if self._played_index == 0: if self._played_index == 0:
ZopeTestCase._print('\nStarting New Sequence %i... ' % sequence_number) ZopeTestCase._print('\nStarting New Sequence %i... ' % sequence_number)
...@@ -146,7 +146,7 @@ class Sequence: ...@@ -146,7 +146,7 @@ class Sequence:
def setdefault(self, key, default=None): def setdefault(self, key, default=None):
return self._dict.setdefault(key, default) return self._dict.setdefault(key, default)
def __call__(self, sequence_string, sequence_number=0, quiet=0): def __call__(self, sequence_string, sequence_number=0, quiet=1):
""" """
add some steps and directly runs them, this allows to easily write add some steps and directly runs them, this allows to easily write
such code when sequence are unable to handle too complex cases : such code when sequence are unable to handle too complex cases :
...@@ -199,7 +199,7 @@ class SequenceList: ...@@ -199,7 +199,7 @@ class SequenceList:
self.addSequence(sequence) self.addSequence(sequence)
return sequence return sequence
def play(self, context, quiet=0): def play(self, context, quiet=1):
i = 1 i = 1
for sequence in self._sequence_list: for sequence in self._sequence_list:
sequence._played_index = 0 sequence._played_index = 0
......
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