def test_add_piece(self): b = Board() b.clear() for square, piece in self.data.items(): b.add_piece(piece, square) # Validate added piece expected_result = b.get_piece(square) self.assertEqual(piece, expected_result) # Validate square for added piece expected_result = b.get_square(piece) self.assertEqual(square, expected_result)
def test_get_square(self): b = Board() for square, piece in self.data.items(): expected_result = b.get_square(piece) self.assertEqual(square, expected_result)