kumquat-buildroot/support/testing/tests/package/sample_python_argh.py
Ricardo Martincoski 1bd9e9c199 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>
2018-11-23 22:05:46 +01:00

11 lines
185 B
Python

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)