コード例 #1
0
 def test_get_set(self):
     board = Board()
     player = "X"
     moves = ["B2", "A2", "B1", "A3", "C3"]
     for move in moves:
         board.make_move(move, player)
     set_of_moves = board.get_set(player)
     self.assertCountEqual(moves, set_of_moves, "Should have same contents")
コード例 #2
0
 def test_get_set_empty(self):
     board = Board()
     player = "X"
     moves = []
     self.assertEqual(moves, board.get_set(player),
                      "No moves made means no moves found")