Coverage for tests / test_deprecation.py: 100%

9 statements  

« prev     ^ index     » next       coverage.py v7.13.1, created at 2026-03-26 21:46 +0000

1import pytest 1abcdefg

2import typer 1abcdefg

3from typer.testing import CliRunner 1abcdefg

4 

5runner = CliRunner() 1abcdefg

6 

7 

8def test_deprecation(): 1abcdefg

9 app = typer.Typer() 1abcdefg

10 

11 def add_command(): 1abcdefg

12 @app.command() 1abcdefg

13 def cmd( 1abcdefg

14 opt: float | None = typer.Option( 1abcdefg

15 3.14, 1abcdefg

16 is_flag=True, 1abcdefg

17 flag_value="42", 1abcdefg

18 help="Some wonderful number", 1abcdefg

19 ), 

20 ): ... # pragma: no cover 

21 

22 with pytest.warns( 1abcdefg

23 match="The 'is_flag' and 'flag_value' parameters are not supported by Typer" 

24 ): 

25 add_command() 1abcdefg