summaryrefslogtreecommitdiff
path: root/tests/test_arguments.py
diff options
context:
space:
mode:
authorArmin Ronacher <armin.ronacher@active-4.com>2014-05-29 02:50:41 +0600
committerArmin Ronacher <armin.ronacher@active-4.com>2014-05-29 02:50:41 +0600
commita6af25df9c2e82e94c3aa15d579f9347881e5efb (patch)
tree036bc14bbc4f83bec974e055fdb04e5e0385ad6a /tests/test_arguments.py
parentc7299c431933db47c9fab6771e34a9dd46a09415 (diff)
downloadclick-a6af25df9c2e82e94c3aa15d579f9347881e5efb.tar.gz
Fixed a bug in argument handling
Diffstat (limited to 'tests/test_arguments.py')
-rw-r--r--tests/test_arguments.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_arguments.py b/tests/test_arguments.py
index 681c5b9..3f936ed 100644
--- a/tests/test_arguments.py
+++ b/tests/test_arguments.py
@@ -145,6 +145,17 @@ def test_empty_nargs(runner):
assert 'Missing argument "arg"' in result.output
+def test_missing_arg(runner):
+ @click.command()
+ @click.argument('arg')
+ def cmd(arg):
+ click.echo('arg:' + arg)
+
+ result = runner.invoke(cmd, [])
+ assert result.exit_code == 2
+ assert 'Missing argument "arg".' in result.output
+
+
def test_implicit_non_required(runner):
@click.command()
@click.argument('f', default='test')