Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Nanguage committed Sep 16, 2022
1 parent b24d3bd commit 82fee1c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/wrap_cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion tests/test_dash.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,18 @@ 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):
return a

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

0 comments on commit 82fee1c

Please sign in to comment.