Skip to content
Myr

fix test_detect_program_name

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Lord · committed by David Lord · parent 8106446 · Browse files · 1 file+3 added−11 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−11 removed

  • tests:+3 added−11 removed

1 file+3 added−11 removed

modified:tests/test_utils.py+3 added-11 removed
442 unmodified lines
443 [444 ("example.py", None, "example.py"),445 (str(pathlib.Path("/foo/bar/example.py")), None, "example.py"),446 ("example", None, "example"),447 (448 str(pathlib.Path("example/__main__.py")),449 MockMain(".example"),450 "python -m example",451 ),452 (453 str(pathlib.Path("example/cli.py")),454 MockMain(".example"),455 "python -m example.cli",456 ),447 (str(pathlib.Path("example/__main__.py")), "example", "python -m example"),448 (str(pathlib.Path("example/cli.py")), "example", "python -m example.cli"),449 ],450)451def test_detect_program_name(path, main, expected):460 assert click.utils._detect_program_name(path, _main=main) == expected452 assert click.utils._detect_program_name(path, _main=MockMain(main)) == expected453454455def test_expand_args(monkeypatch):456 user = os.path.expanduser("~")
44 unmodified lines