Skip to content

Commit

Permalink
Show only version on http-prompt --version
Browse files Browse the repository at this point in the history
  • Loading branch information
eliangcs committed May 30, 2016
1 parent accf14e commit ac92e27
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion http_prompt/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def fix_incomplete_url(url):
))
@click.argument('url', default='http://localhost')
@click.argument('http_options', nargs=-1, type=click.UNPROCESSED)
@click.version_option()
@click.version_option(message='%(version)s')
def cli(url, http_options):
click.echo('Version: %s' % __version__)

Expand Down
8 changes: 4 additions & 4 deletions tests/test_installation.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_help():
@pytest.mark.slow
def test_version():
out, err = run_http_prompt(['--version'])
expected = 'http-prompt, version {0}\n'.format(__version__)
if hasattr(expected, 'encode'):
expected = expected.encode('ascii')
assert out == expected
version = __version__
if hasattr(version, 'encode'):
version = version.encode('ascii')
assert out.rstrip() == version

0 comments on commit ac92e27

Please sign in to comment.