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

1import pytest2import 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()