未验证 提交 464bc05e 编写于 作者: R Rudá Moura

multiplexer: Fix code style.

上级 95a65c0c
......@@ -242,6 +242,7 @@ def create_from_yaml(input_yaml):
data = read_ordered_yaml(input_yaml)
return create_from_ordered_data(data)
def path_parent(path):
"""
From a given path, return its parent path.
......@@ -254,6 +255,7 @@ def path_parent(path):
return ''
return parent
def apply_filters(tree, filter_only=[], filter_out=[]):
"""
Apply a set of filters to the tree.
......
......@@ -195,12 +195,12 @@ class TestMultiplex(unittest.TestCase):
def test_multiplex_filter_out_0(self):
f_out = ['']
leaves= apply_filters(self.tree3, filter_out=f_out).get_leaves()
leaves = apply_filters(self.tree3, filter_out=f_out).get_leaves()
self.assertEqual(len(list(multiplex(leaves))), 8)
def test_multiplex_filter_out_1(self):
f_out = ['/arch']
leaves= apply_filters(self.tree3, filter_out=f_out).get_leaves()
leaves = apply_filters(self.tree3, filter_out=f_out).get_leaves()
self.assertEqual(len(list(multiplex(leaves))), 4)
def test_multiplex_filter_out_2(self):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册