예제 #1
0
 def test_move_should_contain_a_comma(self):
     """Move has to have a comma"""
     self.assertFalse(ttt.move_allowed('foobar', self.board))
예제 #2
0
 def test_move_has_to_be_valid(self):
     """Move has to be in a valid format"""
     self.assertFalse(ttt.move_allowed('foo,bar', self.board))
예제 #3
0
 def test_move_out_of_range(self):
     """Cant do a move in a position out of range"""
     self.assertFalse(ttt.move_allowed('10,10', self.board))
예제 #4
0
 def test_move_already_done(self):
     """Cant do a move already done"""
     self.board = ttt.make_move('0,0', self.board, self.p1)
     self.assertFalse(ttt.move_allowed('0,0', self.board))
예제 #5
0
 def test_move_allowed(self):
     """Move should be allowed"""
     assert ttt.move_allowed('0,0', self.board)