tests: Do not use filter objects

The filter objects are not well handled by the unittest framework, pass
a concrete number of occurences instead.
This commit is contained in:
Tomas Babej
2019-01-01 19:32:51 -05:00
committed by Paul Beckingham
parent b8b06e6680
commit 9e7f259d03
2 changed files with 17 additions and 20 deletions

View File

@@ -94,7 +94,7 @@ class TestVerbosity(TestCase):
"""Verbosity blank"""
def count_blank_lines(x):
return len(filter(operator.not_, x.splitlines()))
return x.splitlines().count('')
code, out, err = self.t("rc.verbose:nothing ls")
self.assertEqual(count_blank_lines(out), 0)