Ask Your Question
0 w/ new directory

asked 2011-08-18 17:50:29 -0500

fred-yang gravatar image


I have created a new subdiretory ~/nova/nova/attestation with a new file I have also create a new unit test under ~/nova/tests/scheduler/ where has "from nova.attestation import service"

When I run "python scheduler.test_attestation:TestAttestation.test_sdk", I am experiencing following error. that can't locate attestation directory. Do I need to specify new created directory in anyplace for testing?


fred@storky:~/d2/nova$ python scheduler.test_attestation:TestAttestation.test_sdk 2011-08-18 10:37:51,066 INFO rdflib [-] version: 2.4.2 Failure runTest ERROR


ERROR: Failure: ImportError (No module named attestation)

Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/nose/", line 382, in loadTestsFromName addr.filename, addr.module) File "/usr/lib/pymodules/python2.7/nose/", line 39, in importFromPath return self.importFromDir(dir_path, fqname) File "/usr/lib/pymodules/python2.7/nose/", line 86, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "/home/fred/d2/nova/nova/tests/scheduler/", line 40, in <module> from nova.attestation import service ImportError: No module named attestation

Ran 1 test in 0.001s

FAILED (errors=1)

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2011-08-19 14:17:59 -0500

fred-yang gravatar image

Thanks Brian Lamar, that solved my question.

edit flag offensive delete link more

answered 2011-08-19 13:33:49 -0500

blamar gravatar image

Make sure your 'attestation' directory contains an file. Python requires these files to certify that the directory is a module.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2011-08-18 17:50:29 -0500

Seen: 70 times

Last updated: Aug 19 '11