[TOX] can't pass tox on clean build

asked 2013-06-27 00:30:21 -0500

mmaleckk gravatar image

Hello,

Trying to run tox (tox -epy27) from the root of a brand new cloned Quantum build, I obtain a bunch of errors ALL like the following:

ImportError: Failed to import test module: quantum.tests.unit.testlib_api Traceback (most recent call last): File "/usr/lib/python2.7/unittest/loader.py", line 252, in _find_tests module = self._get_module_from_name(name) File "/usr/lib/python2.7/unittest/loader.py", line 230, in _get_module_from_name __import__(name) File "/opt/stack/quantum/quantum/tests/unit/testlib_api.py", line 20, in <module> from quantum import wsgi File "/opt/stack/quantum/quantum/wsgi.py", line 39, in <module> from quantum import context File "/opt/stack/quantum/quantum/context.py", line 24, in <module> from quantum.db import api as db_api File "/opt/stack/quantum/quantum/db/api.py", line 23, in <module> from quantum.openstack.common.db.sqlalchemy import session File "/opt/stack/quantum/quantum/openstack/common/db/sqlalchemy/session.py", line 283, in <module> deprecated_opts=[cfg.DeprecatedOpt('sql_connection', AttributeError: 'module' object has no attribute 'DeprecatedOpt'

And then it ends this way:


Binary content: traceback (test/plain; charset="utf8") Ran 501 tests in 2.623s (-0.267s) FAILED (id=8, failures=127) error: testr failed (1) ERROR: InvocationError: '/opt/stack/quantum/.tox/py27/bin/python setup.py testr --slowest --testr-args=' ______________________________________________________________________ summary _______________________________________________________________________ ERROR: py27: commands failed

Am I missing something? :)

edit retag flag offensive close merge delete

5 answers

Sort by » oldest newest most voted
0

answered 2013-07-12 06:49:48 -0500

I had to move oslo from /usr/local/lib/python2.7/dist-packages/ to .tox/py27/lib/python2.7/site-packages/

edit flag offensive delete link more
0

answered 2013-06-27 04:13:02 -0500

gongysh gravatar image

try to remove your current oslo module in system and then install: http://tarballs.openstack.org/oslo.config/oslo.config-1.2.0a2.tar.gz#egg=oslo.config-1.2.0a2 (http://tarballs.openstack.org/oslo.co...) .

For example: cd /usr/local/lib/python2.7/dist-packages/ rm -rf oslo pip install http://tarballs.openstack.org/oslo.config/oslo.config-1.2.0a2.tar.gz#egg=oslo.config-1.2.0a2 (http://tarballs.openstack.org/oslo.co...)

and then remove your .tox and then do tox -e py27

edit flag offensive delete link more
0

answered 2013-06-27 05:14:12 -0500

I think it should be done within .tox/py27 directory

edit flag offensive delete link more
0

answered 2013-06-28 17:43:57 -0500

mmaleckk gravatar image

Thanks yong sheng gong, that solved my question.

edit flag offensive delete link more
0

answered 2013-06-28 17:46:03 -0500

mmaleckk gravatar image

Note: I followed yong shen gong suggestion, but I changed the oslo module from the .tox/py27 directory just like Eugene said.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-06-27 00:30:21 -0500

Seen: 183 times

Last updated: Jul 12 '13