Add __version__ to init file - toot - Unnamed repository; edit this file 'descr… | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit db4e1d59f3cae8505805a8567bd6d7e72c6b6f3b | |
parent d3d69509cb6b2c22bd202bd66a20bc3e9a555cc2 | |
Author: Ivan Habunek <[email protected]> | |
Date: Mon, 15 Jan 2018 12:19:37 +0100 | |
Add __version__ to init file | |
Diffstat: | |
tests/test_version.py | 8 ++++++++ | |
toot/__init__.py | 2 ++ | |
2 files changed, 10 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/tests/test_version.py b/tests/test_version.py | |
@@ -0,0 +1,8 @@ | |
+import toot | |
+from pkg_resources import get_distribution | |
+ | |
+ | |
+def test_version(): | |
+ """Version specified in __version__ should be the same as the one | |
+ specified in setup.py.""" | |
+ assert toot.__version__ == get_distribution('toot').version | |
diff --git a/toot/__init__.py b/toot/__init__.py | |
@@ -2,6 +2,8 @@ | |
from collections import namedtuple | |
+__version__ = '0.16.2' | |
+ | |
App = namedtuple('App', ['instance', 'base_url', 'client_id', 'client_secret']) | |
User = namedtuple('User', ['instance', 'username', 'access_token']) | |