support/testing: add python-click 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:
Ricardo Martincoski
2018-11-16 01:57:26 -02:00
committed by Thomas Petazzoni
parent 61b4b81c44
commit 887248d354
3 changed files with 58 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
import click
@click.command()
@click.argument("foo")
@click.option("--bar", is_flag=True, help="help for bar")
def main(foo, bar):
click.echo("{}, {}".format(foo, bar))
if __name__ == '__main__':
main()