def start(): playing = True while playing: first = 0 print("\nEnter the Starting number") begin = enter_a_number(first) print("\nEnter the Ending number") end = enter_a_number(begin) fizzBuzz_list = number_genterator(begin, end) print_list(fizzBuzz_list) count_print_fizzbuzz(fizzBuzz_list) playing = play_again()
def test_input_invlaid_space(self, mock_input): play = play_again() self.assertEqual(sys.stdout.getvalue().strip(), "Please enter 'Y' or 'N'.") self.assertEqual(play, True)
def test_input_n(self, mock_input): play = play_again() self.assertEqual(play, False) self.assertEqual(sys.stdout.getvalue().strip(), "Thanks for playing!!")
def test_input_y(self, mock_input): play = play_again() self.assertEqual(play, True)