Move fixture dependencies to extras
Rather than always installing dependencies for the test tools included in the library, define an extras called "test" and include the dependencies there. Add API documentation for the fixture module, and include notes about installing the extra dependencies in the module documentation and installation instructions. Closes-Bug: #1440350 Depends-On: I78838dcd4da43b3c1d2610ac87a3ec55b9535646 Depends-On: Ibd2410e0153053b5121155474e99752256c7e4b8 Change-Id: I4e45c1bb4f08c9da510939514c5358e1575d3e0a
This commit is contained in:
parent
087af703da
commit
3f9f2e1199
8
doc/source/api/fixture.rst
Normal file
8
doc/source/api/fixture.rst
Normal file
@ -0,0 +1,8 @@
|
||||
=========
|
||||
fixture
|
||||
=========
|
||||
|
||||
.. automodule:: oslo_versionedobjects.fixture
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
@ -5,3 +5,8 @@
|
||||
At the command line::
|
||||
|
||||
$ pip install oslo.versionedobjects
|
||||
|
||||
To use ``oslo_versionedobjects.fixture``, some additional dependencies
|
||||
are needed. They can be installed using the ``fixtures`` extra::
|
||||
|
||||
$ pip install 'oslo.versionedobjects[fixtures]'
|
||||
|
@ -9,6 +9,16 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
"""Fixtures for writing tests for code using oslo.versionedobjects
|
||||
|
||||
.. note::
|
||||
|
||||
This module has several extra dependencies not needed at runtime
|
||||
for production code, and therefore not installed by default. To
|
||||
ensure those dependencies are present for your tests, add
|
||||
``oslo.versionedobjects[fixtures]`` to your list of test dependencies.
|
||||
|
||||
"""
|
||||
|
||||
from collections import OrderedDict
|
||||
import hashlib
|
||||
|
@ -12,7 +12,4 @@ oslo.utils>=1.6.0 # Apache-2.0
|
||||
iso8601>=0.1.9
|
||||
oslo.log>=1.2.0 # Apache-2.0
|
||||
oslo.i18n>=1.5.0 # Apache-2.0
|
||||
mock>=1.1;python_version!='2.6'
|
||||
mock==1.0.1;python_version=='2.6'
|
||||
fixtures>=1.3.1
|
||||
WebOb>=1.2.3
|
||||
|
@ -22,6 +22,12 @@ classifier =
|
||||
packages =
|
||||
oslo_versionedobjects
|
||||
|
||||
[extras]
|
||||
fixtures =
|
||||
mock>=1.1:python_version!='2.6'
|
||||
mock==1.0.1:python_version=='2.6'
|
||||
fixtures>=1.3.1
|
||||
|
||||
[pbr]
|
||||
warnerrors = true
|
||||
|
||||
|
4
tox.ini
4
tox.ini
@ -12,7 +12,7 @@ envlist = py34,py27,pypy,pep8
|
||||
install_command = pip install -U {opts} {packages}
|
||||
setenv =
|
||||
VIRTUAL_ENV={envdir}
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
deps = .[fixtures]
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
commands = python setup.py testr --slowest --testr-args='{posargs}'
|
||||
|
||||
@ -45,4 +45,4 @@ import_exceptions = oslo_versionedobjects._i18n
|
||||
# this also means that pip-missing-reqs must be installed separately, outside
|
||||
# of the requirements.txt files
|
||||
deps = pip_missing_reqs
|
||||
commands = pip-missing-reqs -d --ignore-module=oslo_versionedobjects* --ignore-module=pkg_resources --ignore-file=oslo_versionedobjects/test.py --ignore-file=oslo_versionedobjects/tests/* oslo_versionedobjects
|
||||
commands = pip-missing-reqs -d --ignore-module=oslo_versionedobjects* --ignore-module=pkg_resources --ignore-file=oslo_versionedobjects/test.py --ignore-file=oslo_versionedobjects/tests/* oslo_versionedobjects
|
||||
|
Loading…
x
Reference in New Issue
Block a user