summaryrefslogtreecommitdiff
path: root/tests/test_arguments.py
diff options
context:
space:
mode:
authorRobert Grant <rhgrant10@gmail.com>2018-05-15 13:17:32 -0700
committerRobert Grant <rhgrant10@gmail.com>2018-05-15 13:17:32 -0700
commit99ff511e9ce04a07feddf16c810af726ad6831d2 (patch)
tree542c32265f28235fcd3b5c2bc74115282118008e /tests/test_arguments.py
parent1dee2552f3555b4299f00d03b4bd971f1ce89555 (diff)
downloadclick-99ff511e9ce04a07feddf16c810af726ad6831d2.tar.gz
Only allow one param decl for Arguments
Diffstat (limited to 'tests/test_arguments.py')
-rw-r--r--tests/test_arguments.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_arguments.py b/tests/test_arguments.py
index a6a3258..1cdb43d 100644
--- a/tests/test_arguments.py
+++ b/tests/test_arguments.py
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
+import pytest
import click
from click._compat import PY2
@@ -287,3 +288,11 @@ def test_defaults_for_nargs(runner):
result = runner.invoke(cmd, ['3'])
assert result.exception is not None
assert 'argument a takes 2 values' in result.output
+
+
+@pytest.mark.xfail
+def test_multiple_param_decls_not_allowed(runner):
+ @click.command()
+ @click.argument('x', click.Choice(['a', 'b']))
+ def copy(x):
+ click.echo(x)