Skip to content

Commit 6b329ae

Browse files
committed
Lint
1 parent 1d0fa6c commit 6b329ae

2 files changed

Lines changed: 22 additions & 14 deletions

File tree

tests/test_processing.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ class CW(Node):
2525

2626
class ProcessingTest(unittest.TestCase):
2727
def test_search_by_type(self):
28-
self.assertEquals(["1", "2", "3", "4", "5", "6"],
29-
[i.name for i in box.search_by_type(Item)])
30-
self.assertEquals(["root", "first", "1", "2", "big", "small", "3", "4", "5", "6"],
31-
[n.name for n in box.search_by_type(Node)])
28+
self.assertEquals(["1", "2", "3", "4", "5", "6"], [i.name for i in box.search_by_type(Item)])
29+
self.assertEquals(
30+
["root", "first", "1", "2", "big", "small", "3", "4", "5", "6"],
31+
[n.name for n in box.search_by_type(Node)]
32+
)
3233

3334
def test_replace_in_list(self):
3435
a1 = AW("1")

tests/test_traversing.py

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ def test_walk_within_with_outside_position(self):
99
self.assertEquals([], [n.name for n in box.walk_within(pos(15, 1, 15, 1))])
1010

1111
def test_walk_within_with_root_position(self):
12-
self.assertEquals(["root", "first", "1", "2", "big", "small", "3", "4", "5", "6"],
13-
[n.name for n in box.walk_within(box.position)])
12+
self.assertEquals(
13+
["root", "first", "1", "2", "big", "small", "3", "4", "5", "6"],
14+
[n.name for n in box.walk_within(box.position)]
15+
)
1416

1517
def test_walk_within_with_leaf_position(self):
1618
self.assertEquals(["6"], [n.name for n in box.walk_within(pos(13, 3, 13, 9))])
@@ -19,19 +21,24 @@ def test_walk_within_with_subtree_position(self):
1921
self.assertEquals(["small", "3", "4", "5"], [n.name for n in box.walk_within(pos(7, 5, 11, 5))])
2022

2123
def test_walk_depth_first(self):
22-
self.assertEquals(["root", "first", "1", "2", "big", "small", "3", "4", "5", "6"],
23-
[n.name for n in box.walk()])
24+
self.assertEquals(
25+
["root", "first", "1", "2", "big", "small", "3", "4", "5", "6"],
26+
[n.name for n in box.walk()]
27+
)
2428

2529
def test_walk_leaves_first(self):
26-
self.assertEquals(["1", "first", "2", "3", "4", "5", "small", "big", "6", "root"],
27-
[n.name for n in box.walk_leaves_first()])
30+
self.assertEquals(
31+
["1", "first", "2", "3", "4", "5", "small", "big", "6", "root"],
32+
[n.name for n in box.walk_leaves_first()]
33+
)
2834

2935
def test_walk_descendants(self):
30-
self.assertEquals(["first", "1", "2", "big", "small", "3", "4", "5", "6"],
31-
[n.name for n in box.walk_descendants()])
36+
self.assertEquals(
37+
["first", "1", "2", "big", "small", "3", "4", "5", "6"],
38+
[n.name for n in box.walk_descendants()]
39+
)
3240

3341
def test_walk_ancestors(self):
3442
box.assign_parents()
3543
item4 = box.contents[2].contents[0].contents[1]
36-
self.assertEquals(["small", "big", "root"],
37-
[n.name for n in item4.walk_ancestors()])
44+
self.assertEquals(["small", "big", "root"], [n.name for n in item4.walk_ancestors()])

0 commit comments

Comments
 (0)