diff --git a/package/module.py b/package/module.py index 61ef02e..c429d90 100644 --- a/package/module.py +++ b/package/module.py @@ -1,7 +1,7 @@ class Class(): - def __init__(): + def __init__(self): return - def hello_world(): + def hello_world(self): return 'hello world' \ No newline at end of file diff --git a/package/scripts/script.py b/package/scripts/script.py new file mode 100644 index 0000000..e2157dc --- /dev/null +++ b/package/scripts/script.py @@ -0,0 +1,17 @@ + +import sys +from argparse import ArgumentParser +from package.module import Class # rename package, module and class + +def get_args(): + parser = ArgumentParser() + parser.add_argument('--arg', help='') + + return parser.parse_args() + +def run(): + args = get_args() + c = Class() + c.hello_world() + + return \ No newline at end of file diff --git a/package/tests/test_scripts.py b/package/tests/test_scripts.py new file mode 100644 index 0000000..27338bd --- /dev/null +++ b/package/tests/test_scripts.py @@ -0,0 +1,6 @@ +import sys +from package.scripts import script + +def test_script(): + sys.argv = ['--arg=test'] + script.run() \ No newline at end of file