def test_clear_gutter3(self): """ Tests that row 1 is cleared. """ b = Board() target = { (2, 5): "", (2, 6): "b", (2, 7): "b", (1, 5): "", (1, 6): "b", (1, 7): "b", (0, 5): "b", (0, 6): "b", (0, 7): "b" } b.place_piece(target) b.clear_gutter() expected_piece = { (2, 5): "", (2, 6): "b", (2, 7): "b", (1, 5): "", (1, 6): "b", (1, 7): "b", (0, 5): "", (0, 6): "", (0, 7): "" } self.assertDictEqual(expected_piece, b.get_piece((1, 6)))
def test_clear_gutter4(self): """ Tests that row 20 is cleared. """ b = Board() target = { (19, 5): "b", (19, 6): "b", (19, 7): "b", (18, 5): "", (18, 6): "b", (18, 7): "b", (17, 5): "b", (17, 6): "b", (17, 7): "" } b.place_piece(target) b.clear_gutter() expected_piece = { (19, 5): "", (19, 6): "", (19, 7): "", (18, 5): "", (18, 6): "b", (18, 7): "b", (17, 5): "b", (17, 6): "b", (17, 7): "" } self.assertDictEqual(expected_piece, b.get_piece((18, 6)))
def test_clear_gutter2(self): """ Tests that column t is cleared. """ b = Board() target = { (5, 17): "", (5, 18): "b", (5, 19): "b", (4, 17): "", (4, 18): "b", (4, 19): "b", (3, 17): "", (3, 18): "b", (3, 19): "b" } b.place_piece(target) b.clear_gutter() expected_piece = { (5, 17): "", (5, 18): "b", (5, 19): "", (4, 17): "", (4, 18): "b", (4, 19): "", (3, 17): "", (3, 18): "b", (3, 19): "" } self.assertDictEqual(expected_piece, b.get_piece((4, 18)))