@@ 122-131 (lines=10) @@ | ||
119 | ||
120 | expected_ends = [(0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (0, 6), (0, 7)] |
|
121 | assert ends == expected_ends |
|
122 | ||
123 | def test_get_potential_end_squares_horizontal(self): |
|
124 | start = (0, 0) |
|
125 | directions = [(1, 0)] |
|
126 | ends = get_all_potential_end_locations(start, directions, self.chess_board) |
|
127 | ||
128 | expected_ends = [(1, 0), (2, 0), (3, 0), (4, 0), (5, 0), (6, 0), (7, 0)] |
|
129 | assert ends == expected_ends |
|
130 | ||
131 | def test_get_potential_end_squares_diagonal(self): |
|
132 | start = (0, 0) |
|
133 | directions = [(1, 1)] |
|
134 | ends = get_all_potential_end_locations(start, directions, self.chess_board) |
|
@@ 113-120 (lines=8) @@ | ||
110 | ||
111 | new_end_locations = cant_jump_pieces(self.chess_board, start, None, starting_end_locations, Mock()) |
|
112 | ||
113 | assert new_end_locations == starting_end_locations |
|
114 | ||
115 | def test_get_potential_end_squares_vertical(self): |
|
116 | start = (0, 0) |
|
117 | directions = [(0, 1)] |
|
118 | ends = get_all_potential_end_locations(start, directions, self.chess_board) |
|
119 | ||
120 | expected_ends = [(0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (0, 6), (0, 7)] |
|
121 | assert ends == expected_ends |
|
122 | ||
123 | def test_get_potential_end_squares_horizontal(self): |