Ask Your Question
0

nosetests: no module named tempest

asked 2015-11-24 05:47:29 -0500

Randomly Named User gravatar image

I've created a virtual environment using ./run_tempest.sh in the tempest directory in /opt/stack/tempest/. Then, I activate the virtual environment by running ./venv/bin/activate.

When I run any test, for example,

(.venv)root@ubuntu:/opt/stack/tempest# nosetests -vx tempest.api.identity.admin.v3.test_users.py

I get this error

Failure: ImportError (No module named tempest_lib) ... ERROR

======================================================================
ERROR: Failure: ImportError (No module named tempest_lib)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 411, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/opt/stack/tempest/tempest_test/tempest/tempest/api/identity/admin/v3/test_users.py", line 16, in <module>
    from tempest.api.identity import base
  File "/opt/stack/tempest/tempest_test/tempest/tempest/api/identity/base.py", line 17, in <module>
    from tempest_lib import exceptions as lib_exc
ImportError: No module named tempest_lib

----------------------------------------------------------------------
Ran 1 test in 0.001s

FAILED (errors=1)

Any idea why it's failing?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
1

answered 2016-01-06 22:46:17 -0500

Jagan Prakash gravatar image

fix the python dependencies in the virtual environment then you wont get the above error

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-11-24 05:47:29 -0500

Seen: 460 times

Last updated: Jan 06 '16