Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion tests/test_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,11 @@ def test_calls_original_launch_when_not_passing_urls():
with patch("typer.main.click.launch", return_value=0) as launch_mock:
typer.launch("not a url")

launch_mock.assert_called_once_with("not a url")
launch_mock.assert_called_once_with("not a url", wait=False, locate=False)


def test_launch_locating_file():
with patch("typer.main.click.launch", return_value=0) as launch_mock:
typer.launch("/path/to/file", locate=True)

launch_mock.assert_called_once_with("/path/to/file", wait=False, locate=True)
2 changes: 1 addition & 1 deletion typer/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1136,4 +1136,4 @@ def launch(url: str, wait: bool = False, locate: bool = False) -> int:
return 0

else:
return click.launch(url)
return click.launch(url, wait=wait, locate=locate)
Loading