Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

run_test.py w/ new directory

Hi,

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

When I run "python run_tests.py 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?

Thanks,

fred@storky:~/d2/nova$ python run_tests.py 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/loader.py", line 382, in loadTestsFromName addr.filename, addr.module) File "/usr/lib/pymodules/python2.7/nose/importer.py", line 39, in importFromPath return self.importFromDir(dir_path, fqname) File "/usr/lib/pymodules/python2.7/nose/importer.py", line 86, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "/home/fred/d2/nova/nova/tests/scheduler/test_attestation.py", line 40, in <module> from nova.attestation import service ImportError: No module named attestation


Ran 1 test in 0.001s

FAILED (errors=1)