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:
committed by
Paul Beckingham
parent
b8b06e6680
commit
9e7f259d03
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user