def test_history_toolbar(self): human = Human() expected_content = "" actual_content = human._history_toolbar() self.assertEqual(actual_content, expected_content) human.history.append(C, C) expected_content = "History (human, opponent): [('C', 'C')]" actual_content = human._history_toolbar() self.assertIn(actual_content, expected_content)
def test_history_toolbar(self): human = Human() expected_content = '' actual_content = human._history_toolbar(None)[0][1] self.assertEqual(actual_content, expected_content) human.history = [C] human.opponent_history = [C] expected_content = "History (Human, opponent): [('C', 'C')]" actual_content = human._history_toolbar(None)[0][1] self.assertIn(actual_content, expected_content)
def test_history_toolbar(self): human = Human() expected_content = "" actual_content = human._history_toolbar() self.assertEqual(actual_content, expected_content) human.history = [C] human.opponent_history = [C] expected_content = "History (human, opponent): [('C', 'C')]" actual_content = human._history_toolbar() self.assertIn(actual_content, expected_content)
def test_history_toolbar(self): human = Human() expected_content = '' actual_content = human._history_toolbar(None)[0][1] self.assertEqual(actual_content, expected_content) human.history = ['C'] human.opponent_history = ['C'] # We can't test for this expected content properly until we drop # support for Python 2 as the strings within a string aren't handled # properly. expected_content = "History (Human, opponent): [('C', 'C')]" actual_content = human._history_toolbar(None)[0][1] self.assertIn('History (Human, opponent)', actual_content)
def test_history_toolbar(self): human = Human() expected_content = '' actual_content = human._history_toolbar(None)[0][1] self.assertEqual(actual_content, expected_content) human.history = ['C'] human.opponent_history = ['C'] # We can't test for this expected content properly until we drop # support for Python 2 as the strings within a string aren't handled # properly. expected_content = "History (Human, opponent): [('C', 'C')]" actual_content = human._history_toolbar(None)[0][1] self.assertIn('History (Human, opponent)', actual_content)