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.<div>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.<br>
<br><div class="gmail_quote">On Tue, Jun 26, 2012 at 4:28 PM, Kevin L. Mitchell <span dir="ltr"><<a href="mailto:kevin.mitchell@rackspace.com" target="_blank">kevin.mitchell@rackspace.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Tue, 2012-06-26 at 16:21 +0100, Leander Bessa Beernaert wrote:<br>
> It works from the top level, but fails if i try to import it directly<br>
> from the same dir (nova/virt/libvirt). The other files there import<br>
> just fine :/<br>
<br>
</div>Relative imports are iffy at best; imports should ideally always be<br>
absolute.  This is why I suggest that you should always call<br>
run_tests.sh from the top-level of the repository, not from the nova<br>
subdirectory…<br>
<div class="HOEnZb"><div class="h5">--<br>
Kevin L. Mitchell <<a href="mailto:kevin.mitchell@rackspace.com">kevin.mitchell@rackspace.com</a>><br>
<br>
</div></div></blockquote></div><br></div>