Beispiel #1
0
def master():
    print("""
    #####################################################################
    ###                          Master.py                            ###
    #####################################################################
    #                                                                   #
    # Hello, and welcome to the Master.py!                              #
    #                                                                   #
    # With this simple file you will be able to navigate to any of the  #
    # other Python projects.                                            #
    #                                                                   #
    # Simply type in the name of the project you would like to visit    #
    # and press Enter.                                                  #
    #                                                                   #
    #####################################################################
    #                                                                   #
    # Select from the following files:                                  #
    #     - hello.py                                                    #
    #     - number_game.py                                              #
    #     - farts.py                                                    #
    #     - list.py                                                     #
    #                                                                   #
    #####################################################################
    """)

    selection = input("Enter the name of a Python script you'd like to run: ")

    if selection == "hello.py":
        print("""
    #####################################################################
    ###                             hello.py                          ###
    #####################################################################
    #                                                                   #
    # hello.py is loading ...                                           #
    #                                                                   #
    #####################################################################
        """)
        hello.hello_world()
    elif selection == "number_game.py":
        print("""
    #####################################################################
    ###                         number_game.py                        ###
    #####################################################################
    #                                                                   #
    # number_game.py is loading ...                                     #
    #                                                                   #
    #####################################################################
        """)
        number_game.game()
    elif selection == "farts.py":
        print("""
    #####################################################################
    ###                             farts.py                          ###
    #####################################################################
    #                                                                   #
    # farts.py is loading ...                                           #
    #                                                                   #
    #####################################################################
        """)
        print("farts.py")
    else:
        print("ERROR! Cannot find: ", selection)
        selection = None
        master()
Beispiel #2
0
from hello import hello_world

risultato = hello_world()
print risultato
Beispiel #3
0
import hello

hello.hello_world('world')
Beispiel #4
0
def test_hello_pass():
    assert hello.hello_world() == "Hello!"
Beispiel #5
0
def test_hello_word_is_string():
    assert isinstance(hello_world(), str)
Beispiel #6
0
#Author:Fang hao
#Time:2019/4/13 19:47

import hello
hello.hello_world()

from hello import hello_world
hello_world()

from hello import hello_world as say_hello_world
say_hello_world()

import hello as greeting
greeting.hello_world()

from hello import *
hello_world()
Beispiel #7
0
import hello

hello.hello_world()
hello.hello("ABC")


def my_cb(arg):
    print("Callback called from c")
    print(f"{str(arg)}")

hello.set_callback(my_cb)
hello.call_cb()

def set_str(my_str):
    my_str += "kucing"

c = ""
set_str(c)
print(c)

a = {}
a[1] = "b"
hello.set_dict(a)
print(a["response"])
print("finish")



def test_hello_name():
    assert hello.hello_world("Ed") == "Hello, Ed!"
Beispiel #9
0
import hello
import hello as hl
from hello import hello_world
from hello import *

# hello.hello_world()
# hl.hello_world()
# hello_world()
hello.hello_world()

Beispiel #10
0
def test_answer():
    assert hello.hello_world() == 'hello world, my name is Alex Crosby'
def test_answer():
    assert hello.hello_world() == 'hello world, my name is '
Beispiel #12
0
import hello

print hello.hello_world()
Beispiel #13
0
def say_it():
    hello.hello_world()
Beispiel #14
0
def test_hello_world(capfd):
    assert hello.hello_world() is None
    out = capfd.readouterr().out
    assert out == "Hello, world!\n"
Beispiel #15
0
from hello import hello_world

assert hello_world() == 'Hello World'
import hello

print(hello.hello_world())

 def test_hello_world(self):
     greeting = hello_world("Hello World")
     self.assertEqual(greeting, "Hello World")
Beispiel #18
0
 def test_says_hello(self):
     self.assertEqual(hello_world(), 'Hello from hello.py')
Beispiel #19
0
def test_hello():
    assert hello.hello_world() == "Hello World!"
Beispiel #20
0
def test_hello_word_text():
    assert hello_world() == 'Hello World!'
Beispiel #21
0
def test_hello_world():
    expected = "Hello World"
    result = hello_world()
    assert expected == result
 def test_hello_world(self):
     greeting = hello_world("Hello World")
     self.assertEqual(greeting, "Hello World")