diff options
author | Oleksii Chuprykov <ochuprykov@mirantis.com> | 2014-08-19 15:17:31 +0300 |
---|---|---|
committer | Oleksii Chuprykov <ochuprykov@mirantis.com> | 2014-08-20 18:35:10 +0300 |
commit | 686005e35e2018c79cd43a62bad96d06aa5a0ea1 (patch) | |
tree | 2dd3be77ecc75a8c22a1ec08cb68551147f7150f | |
parent | ec05831e3d7566d1ee3795b047bc790a61a1059e (diff) | |
download | oslo-db-686005e35e2018c79cd43a62bad96d06aa5a0ea1.tar.gz |
Added check to see whether oslotest is installed
The projects that are using oslo.db in tests need to explicitly
include oslotest in their test-requirements.
Closes-bug: 1356425
Change-Id: I0ed01e141221d19af5593857c13a656f32d0f3cf
-rw-r--r-- | oslo/db/sqlalchemy/test_base.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/oslo/db/sqlalchemy/test_base.py b/oslo/db/sqlalchemy/test_base.py index 544568e..849e726 100644 --- a/oslo/db/sqlalchemy/test_base.py +++ b/oslo/db/sqlalchemy/test_base.py @@ -18,7 +18,13 @@ import functools import os import fixtures -from oslotest import base as test_base + +try: + from oslotest import base as test_base +except ImportError: + raise NameError('Oslotest is not installed. Please add oslotest in your' + ' test-requirements') + import six from oslo.db.sqlalchemy import provision |