Esempio n. 1
0
    def test_patter_game_continue(self):
        """

        test case to check the game is draw
        :return:
        """
        result, _ = number_based_win_condition(number_game_continue)
        self.run_test((result, _),
                      ("Continue (The game should continue)", True))
Esempio n. 2
0
    def test_winner_EVEN_row(self):
        """

        test case to check EVEN is the winner for test_winner_EVEN_row input
        :return:
        """
        result, _ = number_based_win_condition(number_game_winner_EVEN_row)
        self.run_test(
            (result.format("EVEN"), _),
            ('Won (The player EVEN has met the criteria for win)', False))
Esempio n. 3
0
    def test_winner_ODD_diagonal(self):
        """

        test case to check ODD is the winner for test_winner_ODD_diagonal input
        :return:
        """
        result, _ = number_based_win_condition(number_game_winner_ODD_diagonal)
        self.run_test(
            (result.format("ODD"), _),
            ('Won (The player ODD has met the criteria for win)', False))