summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qtip/cli/entry.py9
-rw-r--r--tests/unit/cli/test_options.py2
2 files changed, 3 insertions, 8 deletions
diff --git a/qtip/cli/entry.py b/qtip/cli/entry.py
index 0ecb06cd..9f51f25e 100644
--- a/qtip/cli/entry.py
+++ b/qtip/cli/entry.py
@@ -22,7 +22,6 @@ class Context(object):
def __init__(self):
self.verbose = False
self.debug = False
- self.version = 'qtip-1.0.0'
def log(self, msg, *args):
''' Log message to stderr '''
@@ -32,10 +31,6 @@ class Context(object):
''' Log message to stderr when verbose '''
pass
- def version(self):
- ''' Display programs version '''
- pass
-
def debug(self, msg, *args):
''' Log message to debug '''
pass
@@ -72,7 +67,7 @@ class QtipCli(click.MultiCommand):
invoke_without_command=True)
@click.option('-v', '--verbose', is_flag=True, help='Enable verbose mode.')
@click.option('-d', '--debug', is_flag=True, help='Enable debug mode.')
-@click.option('--version', is_flag=True, help='Shows program current version.')
+@click.version_option('dev')
@pass_context
-def cli(ctx, verbose, version, debug):
+def cli(ctx, verbose, debug):
pass
diff --git a/tests/unit/cli/test_options.py b/tests/unit/cli/test_options.py
index 5129b5cc..f9472814 100644
--- a/tests/unit/cli/test_options.py
+++ b/tests/unit/cli/test_options.py
@@ -25,7 +25,7 @@ class TestClass(object):
def test_version(self, runner):
result = runner.invoke(cli, ['--version'])
- assert '' in result.output
+ assert 'dev' in result.output
def test_debug(self, runner):
result = runner.invoke(cli, ['-d'])