def test_get_board_copy(self): test_board = [['0', 'R', '0'], ['R', '0', '0']] flow = Flow(test_board) original_board = flow.get_board_copy() self.assertTrue(utils.equal_boards(test_board, original_board), "Returned board should be the same as the test board") original_board[0][0] = 'T' self.assertFalse(utils.equal_boards(test_board, original_board), "Change made to the returned board. Test board should not be the same as it") self.assertTrue(utils.equal_boards(test_board, flow.get_board_copy()), "Change made to the returned board should not effect the new copy")
def test_get_board_copy(self): test_board = [["0", "R", "0"], ["R", "0", "0"]] flow = Flow(test_board) original_board = flow.get_board_copy() self.assertTrue( utils.equal_boards(test_board, original_board), "Returned board should be the same as the test board" ) original_board[0][0] = "T" self.assertFalse( utils.equal_boards(test_board, original_board), "Change made to the returned board. Test board should not be the same as it", ) self.assertTrue( utils.equal_boards(test_board, flow.get_board_copy()), "Change made to the returned board should not effect the new copy", )