Exemplo n.º 1
0
def main():
    playing = True
    while playing:
        flips = input_flips()
        flip_count = flip_the_coin(flips)
        show_results(flip_count)
        playing = play_again()
Exemplo n.º 2
0
 def test_input_invlaid_space(self, mock_input):
     play = play_again()
     self.assertEqual(sys.stdout.getvalue().strip(),
                      "Please enter 'Y' or 'N'.")
     self.assertEquals(play, True)
Exemplo n.º 3
0
 def test_input_n(self, mock_input):
     play = play_again()
     self.assertEquals(play, False)
     self.assertEqual(sys.stdout.getvalue().strip(), "Thanks for playing!!")
Exemplo n.º 4
0
 def test_input_y(self, mock_input):
     play = play_again()
     self.assertEquals(play, True)