Example #1
0
    def test_compareNotEqual(self):

        the_game = blue()
        the_game.numberUser = 15  ##  give user a higher number than a computer number to test
        the_game.number = 14
        self.assertEqual(the_game.compareNum(), -1, "The number is too high")
Example #2
0
    def test_compareNotEqualA(self):

        the_game = blue()
        the_game.numberUser = 10  ##  give the user number lower than a computer number to test
        the_game.number = 14
        self.assertEqual(the_game.compareNum(), 1, "The number is too low")
Example #3
0
    def test_compareNum(self):

        the_game = blue()
        the_game.numberUser = 15  ##  give a user and computer a same number to test the equality
        the_game.number = 15
        self.assertEqual(the_game.compareNum(), 0, "The number is same")