diff --git a/tests/test_tree.py b/tests/test_tree.py index 719fe78..287b734 100644 --- a/tests/test_tree.py +++ b/tests/test_tree.py @@ -555,12 +555,12 @@ def tearDown(self): def test_show_without_sorting(self): t = Tree() - t.create_node('Students', 'Students', parent=None) - Node(tag='Students', identifier='Students', data=None) - t.create_node('Ben', 'Ben',parent='Students') - Node(tag='Ben', identifier='Ben', data=None) - t.create_node('Annie', 'Annie',parent='Students') - Node(tag='Annie', identifier='Annie', data=None) + t.create_node("Students", "Students", parent=None) + Node(tag="Students", identifier="Students", data=None) + t.create_node("Ben", "Ben", parent="Students") + Node(tag="Ben", identifier="Ben", data=None) + t.create_node("Annie", "Annie", parent="Students") + Node(tag="Annie", identifier="Annie", data=None) t.show() self.assertEqual( t.show(sorting=False, stdout=False), diff --git a/treelib/tree.py b/treelib/tree.py index 908db4e..7d92297 100644 --- a/treelib/tree.py +++ b/treelib/tree.py @@ -222,7 +222,9 @@ def key(node): return node # iter with func - for pre, node in self.__get(nid, level, filter, key, reverse, line_type, sorting): + for pre, node in self.__get( + nid, level, filter, key, reverse, line_type, sorting + ): label = get_label(node) func("{0}{1}".format(pre, label).encode("utf-8"))