def test_main(self,mock_stdout): a=main() self.assertEqual(a,"better luck next time, I HAVE WON")
#Importing required files from game import main as gm from calci import main as cm print( "Hi there I'm Carlo. I can help ypu cheerup by playing a game or helping in conversion of units. So select one of the option below" ) while True: try: choice = int(input("Let's try this\n1. Word Game\n2. Unit convertor")) except ValueError: print("Must be a number") else: if choice in [1, 2]: if choice == 1: print( "So you are going to Game session. My friend SARA will play the game with you" ) gm.main(gm) else: print( "I'm handing over the part to VICTOR. He will help you in converting units." ) cm.main(cm) else: print("Must be in range 1 and 2")
#! /usr/bin/env python from game import main main.main()
from game.main import main main() # x,y # top, left, bottom, right # topleft, bottomleft, topright, bottomright # midtop, midleft, midbottom, midright # center, centerx, centery # size, width, height # w,h # rect1.right = 10 # rect2.center = (20,30) # hero = hero.move(10, 0)
from game.main import main print("welcome to tic-tac-toe\n Your symbol is 'X'") output = main() print(output)
def test_main_game_with_load(self): expected = 2 with patch("builtins.input", return_value=expected): self.assertEqual( main(), 0, msg="Game did not properly run")
from game import main main.main()