support/testing: add python-argh tests
Use a simple script to check the basic usage. Since this package provides command line arguments, override run_sample_scripts to call the script with arguments and check the expected output. Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
committed by
Thomas Petazzoni
parent
0d896cf007
commit
1bd9e9c199
10
support/testing/tests/package/sample_python_argh.py
Normal file
10
support/testing/tests/package/sample_python_argh.py
Normal file
@@ -0,0 +1,10 @@
|
||||
import argh
|
||||
|
||||
|
||||
@argh.arg("foo", help="help for foo")
|
||||
@argh.arg("--bar", help="help for bar")
|
||||
def main(foo, bar=False):
|
||||
print("{}, {}".format(foo, bar))
|
||||
|
||||
|
||||
argh.dispatch_command(main)
|
||||
Reference in New Issue
Block a user