Skip to content

Commit

Permalink
Merge pull request #53 from blueyed/minor
Browse files Browse the repository at this point in the history
Minor: run: required arg, pytest config
  • Loading branch information
blueyed authored Sep 10, 2018
2 parents 0a5f292 + b10918f commit f382332
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
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

0 comments on commit f382332

Please sign in to comment.