Ask Your Question

Why do V3 API tests fail when run using nose but not

asked 2013-06-06 18:26:45 -0500

Just ran into this issue, so capturing the answer here for posterity.

In the past, you could run the tests with:


and everything worked fine.

If you try that now, however, you may notice that some V3 API tests fail. Strangely, the tests will pass if you run them under tox or


Set the PYTHONPATH to you nova root directory, most likely your current-working directory like so:

PYTHONPATH=. nosetests


The V3 API uses stevedore to load plugins, which in turn uses entry points.

pkg_resources, the standard-library module for finding these entry-points keys off of sys.path.

The problem is that, when the nosetests binary is run, its current-working directory is something like '~/.virtualenvs/openstack/bin'. This means that it won't find the nova package in your current working directory.

To force it to find it, we can add the current directory to the sys.path by explicitly setting PYTHONPATH.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-06-06 18:27:10 -0500

Answered this myself.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2013-06-06 18:26:45 -0500

Seen: 41 times

Last updated: Jun 06 '13