diff --git a/docs/wrap_cli.md b/docs/wrap_cli.md index d48ae43..8e71e5c 100644 --- a/docs/wrap_cli.md +++ b/docs/wrap_cli.md @@ -54,7 +54,7 @@ $ python -m oneface.wrap_cli run example.yaml dash_app ``` -## Command insert +## Flag insertion Extra string can insert to the actually executed command when the parameter is a `bool` type. It's useful when the command contains some diff --git a/tests/test_dash.py b/tests/test_dash.py index a914773..8e82924 100644 --- a/tests/test_dash.py +++ b/tests/test_dash.py @@ -23,7 +23,6 @@ def func(a: Arg[int, [-10, 10]] = 0, assert 0 == func.dash_app.layout.children[1].children[1].value assert 20 == func.dash_app.layout.children[2].children[1].value - @app @one def func1(a: bool): @@ -31,3 +30,11 @@ def func1(a: bool): assert 'True' == func1.dash_app.layout.children[1].children[1].value + +def test_download_type(): + @app(result_type="download") + @one + def func(a: str): + return "" + + assert func.dash_app is not None