Skip to content
Myr

Use pytest.raises instead of pytest.mark.xfail

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Robert Grant · committed by Robert Grant · parent 6859e3c · Browse files · 1 file+5 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−5 removed

  • tests:+5 added−5 removed

1 file+5 added−5 removed

modified:tests/test_arguments.py+5 added-5 removed
288 unmodified lines
289 assert result.exception is not None290 assert 'argument a takes 2 values' in result.output291292293@pytest.mark.xfail(strict=True)293def test_multiple_param_decls_not_allowed(runner):294 with pytest.raises(TypeError):295 @click.command()296 @click.argument('x', click.Choice(['a', 'b']))297 def copy(x):298 click.echo(x)295 @click.command()296 @click.argument('x', click.Choice(['a', 'b']))297 def copy(x):298 click.echo(x)