Esempio n. 1
0
 def test_get_human_input_d(self):
     with patch("axelrod.human.prompt", return_value="d") as prompt_:
         actions = [(D, C)] * 5
         self.versus_test(Cooperator(), expected_actions=actions)
         self.assertEqual(prompt_.call_args[0],
                          ("Turn 5 action [C or D] for human: ", ))
Esempio n. 2
0
 def test_get_human_input_C(self):
     with patch('axelrod.human.prompt', return_value='C') as prompt_:
         actions = [(C, C)] * 5
         self.versus_test(Cooperator(), expected_actions=actions)
         self.assertEqual(prompt_.call_args[0],
                          ('Turn 5 action [C or D] for human: ', ))