test: Don't wait on --sit when test succeeds

Python's `filter()` returns a "filter object", which is truthy.
This commit is contained in:
Lars Karlitski 2019-06-02 19:52:59 +02:00
parent 42c7c0691c
commit 33151372df
1 changed files with 2 additions and 1 deletions

View File

@ -57,7 +57,8 @@ class ComposerTestCase(unittest.TestCase):
def tearDown(self):
# 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)
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:
for e in errors:
print_exception(*e)