Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor: run: required arg, pytest config #53

Merged
merged 3 commits into from
Sep 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ workflows:
version: 2
test:
jobs:
- py37
- py36
- py35
- py34
Expand Down
2 changes: 1 addition & 1 deletion covimerage/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def write_coverage(profile_file, data_file, source, append):
# ignore_unknown_options=True,
allow_interspersed_args=False,
))
@click.argument('args', nargs=-1, type=click.UNPROCESSED)
@click.argument('args', nargs=-1, required=True, type=click.UNPROCESSED)
@click.option('--wrap-profile/--no-wrap-profile', required=False,
default=True, show_default=True,
help='Wrap VIM cmd with options to create a PROFILE_FILE.')
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool:pytest]
testpaths = tests
addopts = -ra
addopts = -ra -vv

[isort]
combine_as_imports = 1
Expand Down
6 changes: 6 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -762,3 +762,9 @@ def test_run_forwards_sighup(devnull):
stderr = stderr.decode()
assert 'Command exited non-zero: 89' in stderr
assert exit_code == 89


def test_run_cmd_requires_args(runner):
result = runner.invoke(cli.run, [])
assert 'Error: Missing argument "args".' in result.output.splitlines()
assert result.exit_code == 2