Coverage for tests / test_cli / test_program_name.py: 100%

6 statements  

« prev     ^ index     » next       coverage.py v7.13.1, created at 2026-11-18 11:12 +0000

1from typer import _click 1abcdefghij

2 

3 

4def test_detect_program_name_submodule_path() -> None: 1abcdefghij

5 class MainModule: 1abcdefghij

6 __package__ = "example" 1abcdefghij

7 

8 program_name = _click.utils._detect_program_name( 1abcdefghij

9 path="/tmp/cli.py", 

10 _main=MainModule(), 

11 ) 

12 

13 assert program_name == "python -m example.cli" 1abcdefghij