Skip to content

Commit

Permalink
test: Don't wait on --sit when test succeeds
Browse files Browse the repository at this point in the history
Python's `filter()` returns a "filter object", which is truthy.
  • Loading branch information
larskarlitski committed Jun 4, 2019
1 parent 42c7c06 commit 3315137
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/composertest.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ def setUp(self):
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)
Expand Down

0 comments on commit 3315137

Please sign in to comment.