From 1bd9e9c199a334a035e9b4690135fdaf849b3d76 Mon Sep 17 00:00:00 2001 From: Ricardo Martincoski Date: Fri, 16 Nov 2018 01:57:21 -0200 Subject: 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 Signed-off-by: Thomas Petazzoni --- support/testing/tests/package/sample_python_argh.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 support/testing/tests/package/sample_python_argh.py (limited to 'support/testing/tests/package/sample_python_argh.py') diff --git a/support/testing/tests/package/sample_python_argh.py b/support/testing/tests/package/sample_python_argh.py new file mode 100644 index 0000000000..48247bf604 --- /dev/null +++ b/support/testing/tests/package/sample_python_argh.py @@ -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) -- cgit v1.2.3