Make the tests actually run
Firstly, add a missing oslo/version/__init__.py. Secondly, move tests from oslo/version/tests/ to tests/ Having the tests under oslo.version and using oslo.sphinx in the same virtual env doesn't seem to work. The issue appears to be that because the tests don't get installed under the namespace package in the venv's site-packages, testr can't find them. Personally, I'm a fan of keeping tests in a different directory from the runtime code and this is what works for oslo.config and oslo.messaging. Thirdly, avoid using 'setup.py develop' with tox. There seems to be an issue with the 'setup.py develop' approach caused by the fact that oslo is a namespace package and we install oslo.sphinx into this namespace in the virtualenv. This results in the oslo.version package not being found when it's not properly installed into the virtualenv. These really should be three separate commits, but any one of them alone causes testr to stop pretending everything is fine so they all need to be merged together. Closes-Bug: #1242614 Change-Id: I5140fa62dc8bdd10a58bd2847b27514a926e3c19
This commit is contained in:
parent
464efedfdd
commit
bcb3096041
15
oslo/version/__init__.py
Normal file
15
oslo/version/__init__.py
Normal file
@ -0,0 +1,15 @@
|
||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||
|
||||
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
@ -19,8 +19,8 @@ import os
|
||||
|
||||
import fixtures
|
||||
|
||||
from oslo.version import tests
|
||||
from oslo.version import version
|
||||
import tests
|
||||
|
||||
|
||||
class DeferredVersionTestCase(tests.BaseTestCase):
|
Loading…
x
Reference in New Issue
Block a user