Skip to content
Myr

test_deprecation.py

This file

Path

tests/test_deprecation.py

25 lines · 564 bytes · Python

Last changed by

Not known.

History of this file

Take it

The walk stopped after 200 commits: lines older than 3780a29 point at it.

📝 Update link syntax to minimal Markdown (#1623)Sebastián Ramírezbefore adoption3780a29

lines 1–25why, one step back
1import pytest
2import typer3from typer.testing import CliRunner45runner = CliRunner()678def test_deprecation():9 app = typer.Typer()1011 def add_command():12 @app.command()13 def cmd(14 opt: float | None = typer.Option(15 3.14,16 is_flag=True,17 flag_value="42",18 help="Some wonderful number",19 ),20 ): ... # pragma: no cover2122 with pytest.warns(23 match="The 'is_flag' and 'flag_value' parameters are not supported by Typer"24 ):25 add_command()