Ejemplo n.º 1
0
    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)
Ejemplo n.º 2
0
    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)
Ejemplo n.º 3
0
    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)
Ejemplo n.º 4
0
    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)
Ejemplo n.º 5
0
    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)