<div dir="ltr"><div><div>Clark/Sean/Shixiong...<br></div><div><br>I have the same error, and tried to import neutron.tests.unit.linuxbridge.test_lb_neutron_agent (no error4 prefix). I get the following<br><br>(py27)rantuttl-mac:bin rtuttle$ python<br>
Python 2.7.5 (v2.7.5:ab05e7dd2788, May 13 2013, 13:18:45) <br>[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin<br>Type "help", "copyright", "credits" or "license" for more information.<br>
>>> import neutron.tests.unit.linuxbridge.test_lb_neutron_agent<br>Traceback (most recent call last):<br>  File "<stdin>", line 1, in <module><br>  File "/Users/rtuttle/projects/neutron/neutron/tests/unit/linuxbridge/test_lb_neutron_agent.py", line 29, in <module><br>
    from neutron.plugins.linuxbridge.agent import linuxbridge_neutron_agent<br>  File "/Users/rtuttle/projects/neutron/neutron/plugins/linuxbridge/agent/linuxbridge_neutron_agent.py", line 33, in <module><br>
    import pyudev<br>ImportError: No module named pyudev<br>>>> <br><br></div>Looks like it wants pyudev, which is not anywhere that I can find, and is not in requirements.txt.<br><br></div><div>Code slice.<br>import distutils.version as dist_version<br>
import os<br>import platform<br>import sys<br>import time<br><br>import eventlet<br>from oslo.config import cfg<br><span style="background-color:rgb(255,255,0)">import pyudev</span><br><br>from neutron.agent import l2population_rpc as l2pop_rpc<br>
from neutron.agent.linux import ip_lib<br><br><br></div><div>Still digging into it...<br></div><div><br></div><div>Randy<br></div><div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 27, 2014 at 3:10 PM, Clark Boylan <span dir="ltr"><<a href="mailto:clark.boylan@gmail.com" target="_blank">clark.boylan@gmail.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="HOEnZb"><div class="h5">On Thu, Feb 27, 2014 at 11:39 AM, Collins, Sean<br>
<<a href="mailto:Sean_Collins2@cable.comcast.com">Sean_Collins2@cable.comcast.com</a>> wrote:<br>
> Shixiong Shang and I ran into this problem with Tox today while we were<br>
> pair programming, and I've also seen similar barfs on my DevStack lab<br>
> boxes - it's quite a mess. Frankly I've moved to using nosetests as a<br>
> workaround, and have added it to the developer docs.<br>
><br>
> We really do need to figure out how to make Tox and Testr give more<br>
> useful failure output - it's so huge it makes my iTerm2 window lock up<br>
> when I try and do an incremental search on the output.<br>
><br>
> Help from a Testr / Tox guru would be appreciated.<br>
><br>
> --<br>
> Sean M. Collins<br>
> _______________________________________________<br>
> OpenStack-dev mailing list<br>
> <a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br>
</div></div>These failures are a result of testr or discover (depending on the<br>
step in the test process, discovery happens first) running into python<br>
import failures. In the example above it looks like<br>
neutron.tests.unit.<br>
linuxbridge.test_lb_neutron_agent failed to import. You can spin up a<br>
python interpreter and try importing that to debug (note that is what<br>
you tried to do but I believe errors4 is part of the error message and<br>
not the thing that couldn't be imported). Flake8 may also catch the<br>
problem. Lifeless has laid the groundwork to fix this upstream in<br>
testtools [0], but I don't think the corresponding testrepository<br>
improvements have been released yet. You can however install<br>
testrepository from source [1] and see if that solves your problem.<br>
<br>
Without seeing the code in question it is really hard to debug any<br>
further. If nosetests does work that would indicate a possible<br>
intertest dependency that nose resolves by running tests in a<br>
particular order which is different than the order used by testr.<br>
Finally, when using the python executable from a virtualenv you don't<br>
want to be in the virtualenv's bin dir. To do a proper import test you<br>
want to be in the root dir of the repository `cd ~/github/neutron` the<br>
either activate the virtualenv and run python or skip activation and<br>
do `.tox/py27/bin/python` to run the virtualenv's python binary.<br>
<br>
[0] <a href="https://github.com/testing-cabal/testtools/commit/6da4893939c6fd2d732bb20a4ac50db2fe639132" target="_blank">https://github.com/testing-cabal/testtools/commit/6da4893939c6fd2d732bb20a4ac50db2fe639132</a><br>
[1] <a href="https://launchpad.net/testrepository/" target="_blank">https://launchpad.net/testrepository/</a><br>
<br>
Hope this helps,<br>
Clark<br>
<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</div></div></blockquote></div><br></div>