Skip to content

Commit 82fee1c

Browse files
committed
add test
1 parent b24d3bd commit 82fee1c

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

docs/wrap_cli.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ $ python -m oneface.wrap_cli run example.yaml dash_app
5454
```
5555

5656

57-
## Command insert
57+
## Flag insertion
5858

5959
Extra string can insert to the actually executed command when the
6060
parameter is a `bool` type. It's useful when the command contains some

tests/test_dash.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,18 @@ def func(a: Arg[int, [-10, 10]] = 0,
2323
assert 0 == func.dash_app.layout.children[1].children[1].value
2424
assert 20 == func.dash_app.layout.children[2].children[1].value
2525

26-
2726
@app
2827
@one
2928
def func1(a: bool):
3029
return a
3130

3231
assert 'True' == func1.dash_app.layout.children[1].children[1].value
3332

33+
34+
def test_download_type():
35+
@app(result_type="download")
36+
@one
37+
def func(a: str):
38+
return ""
39+
40+
assert func.dash_app is not None

0 commit comments

Comments
 (0)