Esempio n. 1
0
 def test_input_wrong_guess(self):
     result = random_game.run_guess(0, )
     self.assertFalse(result)
Esempio n. 2
0
 def test_input_wrong_type(self):
     result = random_game.run_guess('11', 5)
     self.assertFalse(result)
Esempio n. 3
0
 def test_input(self):
     result = random_game.run_guess(5, 5)
     self.assertTrue(result)
Esempio n. 4
0
 def test_input_wrong_number(self):
     result = random_game.run_guess(11, 5)
     self.assertFalse(result)
 def test_correct_guess(self):
     answer = 5
     guess = 5
     result = random_game.run_guess(guess, answer)
     self.assertTrue(result)
 def test_wrong_type(self):
     result = random_game.run_guess("3", 5)
     self.assertIsInstance(result, ValueError)
 def test_out_of_bounds_guess(self):
     result = random_game.run_guess(11, 5)
     self.assertFalse(result)
Esempio n. 8
0
 def test_input(self):
     # please note in the video, I had the parameters flipped it should be the "guess" parameter 1st and "answer" parameter 2nd
     result = random_game.run_guess(5, 5)
     self.assertTrue(result)