mirror of
https://github.com/PartialVolume/shredos.x86_64.git
synced 2026-03-13 06:02:11 +00:00
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:
committed by
Thomas Petazzoni
parent
61b4b81c44
commit
887248d354
12
support/testing/tests/package/sample_python_click.py
Normal file
12
support/testing/tests/package/sample_python_click.py
Normal 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()
|
||||
Reference in New Issue
Block a user