Exemple #1
0
 def test_input(self):
     result = randomgame.run_guess(5, 5)
     self.assertTrue(result)
Exemple #2
0
 def test_input_wrong_guess(self):
     result = randomgame.run_guess(5, 0)
     self.assertFalse(result)
Exemple #3
0
 def test_input_out_of_order_guess(self):
     result = randomgame.run_guess(15, 0)
     self.assertFalse(result)
Exemple #4
0
 def test_input_string(self):
     result = randomgame.run_guess(15, 'sdefsf')
     self.assertFalse(result)
Exemple #5
0
 def test_input(self):
     answer = 5
     guess = 5
     result = run_guess(answer, guess)
     self.assertTrue(result)
Exemple #6
0
 def test_string_input(self):
     result = run_guess(5, "yo")
     self.assertFalse(result)
Exemple #7
0
 def test_large_num(self):
     result = run_guess(5, 11)
     self.assertFalse(result)
Exemple #8
0
 def test_wrong_guess(self):
     result = run_guess(5, 0)
     self.assertFalse(result)
Exemple #9
0
 def test_randgame(self):
     r = 5
     guess = 5
     result = randomgame.run_guess(r, guess)
     self.assertTrue(result)