Skip to content

Commit

Permalink
Fix flake violation (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
caesar0301 authored Mar 28, 2023
1 parent 781e38d commit 4a5b672
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
12 changes: 6 additions & 6 deletions tests/test_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
4 changes: 3 additions & 1 deletion treelib/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))

Expand Down

0 comments on commit 4a5b672

Please sign in to comment.