test: Don't wait on --sit when test succeeds
Python's `filter()` returns a "filter object", which is truthy.
This commit is contained in:
parent
42c7c0691c
commit
33151372df
@ -57,7 +57,8 @@ class ComposerTestCase(unittest.TestCase):
|
|||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
# Peek into internal data structure, because there's no way to get the
|
# Peek into internal data structure, because there's no way to get the
|
||||||
# TestResult at this point. `errors` is a list of tuples (method, error)
|
# TestResult at this point. `errors` is a list of tuples (method, error)
|
||||||
errors = filter(None, [ e[1] for e in self._outcome.errors ])
|
errors = list(e[1] for e in self._outcome.errors if e[1])
|
||||||
|
|
||||||
if errors and self.sit:
|
if errors and self.sit:
|
||||||
for e in errors:
|
for e in errors:
|
||||||
print_exception(*e)
|
print_exception(*e)
|
||||||
|
Loading…
Reference in New Issue
Block a user