<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:8pt"><div id="yiv0501738557"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:8pt;"><div id="yiv0501738557yui_3_13_0_ym1_7_1394784634013_29">Hi,</div><div id="yiv0501738557yui_3_13_0_ym1_1_1394784634013_4451"><br></div><div style="color:rgb(0, 0, 0);font-size:10.6667px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;" id="yiv0501738557yui_3_13_0_ym1_7_1394784634013_67">I am using tox and nosetests to run my unittests. For some reason, the tests run fine, but I still get 4 identical ImportErrors (one is shown below).</div><div id="yiv0501738557yui_3_13_0_ym1_7_1394784634013_72" style="color:rgb(0, 0,
 0);font-size:10.6667px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;">If I do not set PYTHONPATH to my project
 path I get the same error with just nosetests. It seems that imp.<span id="yiv0501738557yui_3_13_0_ym1_7_1394784634013_43">find_module throws this error because the second argument</span></div><div id="yiv0501738557yui_3_13_0_ym1_7_1394784634013_80" style="color:rgb(0, 0, 0);font-size:10.6667px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;"><span id="yiv0501738557yui_3_13_0_ym1_7_1394784634013_43">(path) is not ' deep'&nbsp; enough (it is just the expanded form of ~; I used pdb with nosetest to find this out).</span> How do I get rid of this annoying error?</div><div id="yiv0501738557yui_3_13_0_ym1_7_1394784634013_90" style="color:rgb(0, 0, 0);font-size:10.6667px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;">I don't understand why it was working before, but it no longer does.
 <br id="yiv0501738557yui_3_13_0_ym1_7_1394784634013_95"></div><div id="yiv0501738557yui_3_13_0_ym1_7_1394784634013_92" style="color:rgb(0, 0, 0);font-size:10.6667px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;"><br><span id="yiv0501738557yui_3_13_0_ym1_7_1394784634013_43"></span></div><div style="color:rgb(0, 0, 0);font-size:10.6667px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;" id="yiv0501738557yui_3_13_0_ym1_7_1394784634013_44">Btw, this happens with Python 2.7, 3.3 and Pypy, and I am on Linux debian 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64 GNU/Linux.<br><br><span id="yiv0501738557yui_3_13_0_ym1_7_1394784634013_43"></span></div><div id="yiv0501738557yui_3_13_0_ym1_7_1394784634013_48" style="color:rgb(0, 0, 0);font-size:10.6667px;font-family:HelveticaNeue, Helvetica Neue,
 Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;"><span id="yiv0501738557yui_3_13_0_ym1_7_1394784634013_43">======================================================================<br>ERROR: Failure: ImportError (No module named 'myModule')<br>----------------------------------------------------------------------<br>Traceback (most recent call last):<br>&nbsp; File "/home/albertjan/nfs/Public/myModule/.tox/py33/lib/python3.3/site-packages/nose/failure.py", line 39, in runTest<br>&nbsp;&nbsp;&nbsp; raise self.exc_val.with_traceback(self.tb)<br>&nbsp; File "/home/albertjan/nfs/Public/myModule/.tox/py33/lib/python3.3/site-packages/nose/loader.py", line 411, in loadTestsFromName<br>&nbsp;&nbsp;&nbsp; addr.filename, addr.module)<br>&nbsp; File "/home/albertjan/nfs/Public/myModule/.tox/py33/lib/python3.3/site-packages/nose/importer.py", line 47, in importFromPath<br>&nbsp;&nbsp;&nbsp; return
 self.importFromDir(dir_path, fqname)<br>&nbsp; File
 "/home/albertjan/nfs/Public/myModule/.tox/py33/lib/python3.3/site-packages/nose/importer.py", line 79, in importFromDir<br>&nbsp;&nbsp;&nbsp; fh, filename, desc = find_module(part, path)<br>&nbsp; File "/home/albertjan/nfs/Public/myModule/.tox/py33/lib/python3.3/imp.py", line 244, in find_module<br>&nbsp;&nbsp;&nbsp; raise ImportError(_bootstrap._ERR_MSG.format(name), name=name)<br id="yiv0501738557yui_3_13_0_ym1_7_1394784634013_56">ImportError: No module named 'myModule'</span></div><br>----------------------------------------------------------------------<br>Ran 66 tests in 5.044s<br><br>FAILED (SKIP=11, errors=4)<br>ERROR: InvocationError: '/home/albertjan/nfs/Public/myModule/.tox/py33/bin/nosetests'<br>___________________________________ summary ____________________________________<br>ERROR:&nbsp;&nbsp; py33: commands failed<div id="yiv0501738557yui_3_13_0_ym1_7_1394784634013_33"><br><br>Thank you in advance!<br><br>Regards,<br>
<br>Albert-Jan<br>
</div><div id="yiv0501738557yui_3_13_0_ym1_1_1394784634013_4356"><br id="yiv0501738557yui_3_13_0_ym1_7_1394784634013_35"><br id="yiv0501738557yui_3_13_0_ym1_7_1394784634013_37"></div><div id="yiv0501738557yui_3_13_0_ym1_7_1394784634013_39">
<br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
<br>All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a <br>
<br>fresh water system, and public health, what have the Romans ever done for us?<br>
<br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <br>
<br></div></div></div></div></div></body></html>