summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qtip/cli/entry.py3
-rw-r--r--setup.cfg1
-rw-r--r--tests/unit/cli/options_test.py3
3 files changed, 5 insertions, 2 deletions
diff --git a/qtip/cli/entry.py b/qtip/cli/entry.py
index 6cf78b58..b84a03d0 100644
--- a/qtip/cli/entry.py
+++ b/qtip/cli/entry.py
@@ -9,6 +9,7 @@
import click
import os
+import pkg_resources as pkg
import sys
@@ -53,7 +54,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.version_option('dev')
+@click.version_option(pkg.require("qtip")[0])
@pass_context
def cli(ctx, verbose, debug):
if debug:
diff --git a/setup.cfg b/setup.cfg
index 23103fc5..71b8c8fd 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,6 @@
[metadata]
name = qtip
+version = 5.0.0
summary = Platform Performance Benchmarking
description-file =
README.md
diff --git a/tests/unit/cli/options_test.py b/tests/unit/cli/options_test.py
index 9dbbe6f3..d7c0f700 100644
--- a/tests/unit/cli/options_test.py
+++ b/tests/unit/cli/options_test.py
@@ -8,6 +8,7 @@
##############################################################################
import pytest
+import re
import sys
from click.testing import CliRunner
@@ -26,7 +27,7 @@ class TestClass(object):
def test_version(self, runner):
result = runner.invoke(cli, ['--version'])
- assert 'dev' in result.output
+ assert re.search(r'\d+\.\d+\.\d+', result.output)
def test_debug(self, runner):
runner.invoke(cli, ['-d'])