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

13 lines
215 B
Python

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()