From 524cd78c5fa7fbb6b221f45cab790b8d15177c43 Mon Sep 17 00:00:00 2001 From: Roman Mogilatov Date: Mon, 23 Nov 2015 20:56:34 +0200 Subject: [PATCH] Add VERSION to API docs and add test for VERSION --- dependency_injector/__init__.py | 6 +++++- docs/api/index.rst | 4 ++++ tests/__init__.py | 12 ++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/dependency_injector/__init__.py b/dependency_injector/__init__.py index 1332f8b5..990eadd0 100644 --- a/dependency_injector/__init__.py +++ b/dependency_injector/__init__.py @@ -47,7 +47,11 @@ from .errors import UndefinedProviderError from . import catalogs catalog = catalogs -VERSION = '0.10.5' +VERSION = '0.11.0' +"""Version number that follows semantic versioning. + +:type: str +""" __all__ = ( diff --git a/docs/api/index.rst b/docs/api/index.rst index 453c853d..f7de7f22 100644 --- a/docs/api/index.rst +++ b/docs/api/index.rst @@ -1,6 +1,10 @@ API Documentation ================= +.. automodule:: dependency_injector + +.. autodata:: VERSION + .. toctree:: :maxdepth: 2 diff --git a/tests/__init__.py b/tests/__init__.py index 3a003995..72a7fbba 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1 +1,13 @@ """Dependency injector unittests.""" + +import unittest2 as unittest + +from dependency_injector import VERSION + + +class VersionTest(unittest.TestCase): + """Version constant tests.""" + + def test_version_follows_semantic_versioning(self): + """Test that version follows semantic versioning.""" + self.assertEquals(len(VERSION.split('.')))