yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #80657
[Bug 1852356] [NEW] tox testenv not installing requirements properly
Public bug reported:
I've encountered this recently when building new tox environments:
=========================
Failures during discovery
=========================
--- import errors ---
Failed to import test module: glance.tests.unit.api.test_cmd
Traceback (most recent call last):
File "/home/brosmait/repos/openstack/glance/.tox/py36/lib/python3.6/site-packages/unittest2/loader.py", line 456, in _find_test_path
module = self._get_module_from_name(name)
File "/home/brosmait/repos/openstack/glance/.tox/py36/lib/python3.6/site-packages/unittest2/loader.py", line 395, in _get_module_from_name
__import__(name)
File "/home/brosmait/repos/openstack/glance/glance/tests/unit/api/test_cmd.py", line 20, in <module>
import glance.cmd.api
File "/home/brosmait/repos/openstack/glance/glance/cmd/api.py", line 42, in <module>
from oslo_reports import guru_meditation_report as gmr
ModuleNotFoundError: No module named 'oslo_reports'
Looking at the current tox.ini, the base testenv sets some env vars and then we have:
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages}
deps = -r{toxinidir}/test-requirements.txt
No mention of the requirements at all.
I think we are hitting a bug that Tony Breeds patched in Cinder, Change-
Id: I5b1c285680f7c3256a707ea5973573f1176d4a26
Change the testenv like this:
install_command = pip install {opts} {packages}
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
This makes sure that the u-c file is applied to both the test-req and
the requirements, which is what we want.
** Affects: glance
Importance: Medium
Assignee: Brian Rosmaita (brian-rosmaita)
Status: In Progress
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1852356
Title:
tox testenv not installing requirements properly
Status in Glance:
In Progress
Bug description:
I've encountered this recently when building new tox environments:
=========================
Failures during discovery
=========================
--- import errors ---
Failed to import test module: glance.tests.unit.api.test_cmd
Traceback (most recent call last):
File "/home/brosmait/repos/openstack/glance/.tox/py36/lib/python3.6/site-packages/unittest2/loader.py", line 456, in _find_test_path
module = self._get_module_from_name(name)
File "/home/brosmait/repos/openstack/glance/.tox/py36/lib/python3.6/site-packages/unittest2/loader.py", line 395, in _get_module_from_name
__import__(name)
File "/home/brosmait/repos/openstack/glance/glance/tests/unit/api/test_cmd.py", line 20, in <module>
import glance.cmd.api
File "/home/brosmait/repos/openstack/glance/glance/cmd/api.py", line 42, in <module>
from oslo_reports import guru_meditation_report as gmr
ModuleNotFoundError: No module named 'oslo_reports'
Looking at the current tox.ini, the base testenv sets some env vars and then we have:
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages}
deps = -r{toxinidir}/test-requirements.txt
No mention of the requirements at all.
I think we are hitting a bug that Tony Breeds patched in Cinder,
Change-Id: I5b1c285680f7c3256a707ea5973573f1176d4a26
Change the testenv like this:
install_command = pip install {opts} {packages}
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
This makes sure that the u-c file is applied to both the test-req and
the requirements, which is what we want.
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1852356/+subscriptions
Follow ups