Skip to content

Commit

Permalink
Skip coverage on test lines that shouldn't execute
Browse files Browse the repository at this point in the history
  • Loading branch information
ryangalamb committed Apr 25, 2023
1 parent af327f1 commit e4b0857
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test_ambiguous_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def test_forbid_default_value_in_annotated_argument():
# for param_decls too.
@app.command()
def cmd(my_param: Annotated[str, typer.Argument("foo")]):
...
... # pragma: no cover

with pytest.raises(AnnotatedParamWithDefaultValueError) as excinfo:
runner.invoke(app)
Expand Down Expand Up @@ -65,7 +65,7 @@ def test_forbid_annotated_param_and_default_param(param, param_info_type):

@app.command()
def cmd(my_param: Annotated[str, param()] = param("foo")):
...
... # pragma: no cover

with pytest.raises(MixedAnnotatedAndDefaultStyleError) as excinfo:
runner.invoke(app)
Expand All @@ -82,7 +82,7 @@ def test_forbid_multiple_typer_params_in_annotated():

@app.command()
def cmd(my_param: Annotated[str, typer.Argument(), typer.Argument()]):
...
... # pragma: no cover

with pytest.raises(MultipleTyperAnnotationsError) as excinfo:
runner.invoke(app)
Expand Down Expand Up @@ -118,7 +118,7 @@ def make_string():

@app.command()
def cmd(my_param: Annotated[str, param(default_factory=make_string)] = "hello"):
...
... # pragma: no cover

with pytest.raises(DefaultFactoryAndDefaultValueError) as excinfo:
runner.invoke(app)
Expand Down Expand Up @@ -166,7 +166,7 @@ def make_string():

@app.command()
def cmd(my_param: str = param("hi", default_factory=make_string)):
...
... # pragma: no cover

with pytest.raises(DefaultFactoryAndDefaultValueError) as excinfo:
runner.invoke(app)
Expand Down

0 comments on commit e4b0857

Please sign in to comment.