def test_zero(self): test_param = 0 test_answer = 5 result = main.guessing_game(test_param, test_answer) self.assertEqual(result, "guess not in range")
def test_more_than_10(self): test_param = 32 test_answer = 5 result = main.guessing_game(test_param, test_answer) self.assertEqual(result, "guess not in range")
def test_incorrect(self): test_param = 1 test_answer = 5 result = main.guessing_game(test_param, test_answer) self.assertFalse(result)
def test_string(self): test_param = "hbfgxgvch" test_answer = 5 with self.assertRaises(ValueError): main.guessing_game(test_param, test_answer)
def test_correct(self): test_param = 5 test_answer = 5 result = main.guessing_game(test_param, test_answer) self.assertTrue(result)