Skip to content

🐛 Fix launch to pass wait and locate parameters to click.launch #1208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
🐛 Fix & add test cases for typer.launch to include wait and locate …
…parameters
phamour committed Apr 30, 2025
commit b0ef9dd0f7a75b461d534d4243d1d6b625820a23
9 changes: 8 additions & 1 deletion tests/test_launch.py
Original file line number Diff line number Diff line change
@@ -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)