Coverage for tests / test_deprecation.py: 100%
9 statements
« prev ^ index » next coverage.py v7.13.1, created at 2026-11-18 11:12 +0000
« prev ^ index » next coverage.py v7.13.1, created at 2026-11-18 11:12 +0000
1import pytest 1abcdefghij
2import typer 1abcdefghij
3from typer.testing import CliRunner 1abcdefghij
5runner = CliRunner() 1abcdefghij
8def test_deprecation(): 1abcdefghij
9 app = typer.Typer() 1abcdefghij
11 def add_command(): 1abcdefghij
12 @app.command() 1abcdefghij
13 def cmd( 1abcdefghij
14 opt: float | None = typer.Option( 1abcdefghij
15 3.14, 1abcdefghij
16 is_flag=True, 1abcdefghij
17 flag_value="42", 1abcdefghij
18 help="Some wonderful number", 1abcdefghij
19 ),
20 ): ... # pragma: no cover
22 with pytest.warns( 1abcdefghij
23 match="The 'is_flag' and 'flag_value' parameters are not supported by Typer"
24 ):
25 add_command() 1abcdefghij