← Back to team overview

openstack team mailing list archive

Re: [OpenStack][Nova] No tests available in custom branch

 

I've managed to fix it by removing the "import libvirt" from
diagnostics.py. I've got the answer to this through sdague in the
openstack-dev irc channel. I'ts now running :)

On Tue, Jun 26, 2012 at 4:44 PM, Kevin L. Mitchell <
kevin.mitchell@xxxxxxxxxxxxx> wrote:

> On Tue, 2012-06-26 at 16:33 +0100, Leander Bessa Beernaert wrote:
> > I'm not calling run_tests.sh from the nova subdirectory. I'm saying
> > that from the location where nova_tests.sh is located, i can import
> > connection.py.
> > However, when i try to import connection.py from with
> > cd=nova/virt/libvirt, it fails. The funny thing is i can import all
> > the modules int that directory perfectly, except connection.py.
>
> That's expected.  Whenever you run Python, the current directory is
> added to the import path.  connection.py has several absolute imports
> that it depends on being able to import; when you run from the top-level
> of the repo, things like "nova.virt.libvirt.utils" can be found, whereas
> importing from the nova/virt/libvirt directory means that
> "nova.virt.libvirt" makes no sense.
> --
> Kevin L. Mitchell <kevin.mitchell@xxxxxxxxxxxxx>
>
>

References