<div class="gmail_quote">Hi Brian,<br><br>On Sat, Apr 25, 2009 at 11:19 PM, Brian Granger <span dir="ltr">&lt;<a href="http://ellisonbg.net">ellisonbg.net</a>@<a href="http://gmail.com">gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Darren,<br>
<br>
Thanks for running this.  As you can see, our testing stuff is a mess<br>
right now.  Due to some subtle things about nose and Twisted, you<br>
definitely need to use iptest to run our test suite.  </blockquote><div><br>In that case, I suggest raising an error if setupegg.py finds nosetests in sys.argv, since running that command seems to yield a zombie ipython process that has to be stopped with ctrl-z.<br>
 </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">See below for a<br>
few specific comments though<br>
<div><div></div><div class="h5"><br>
&gt; I installed the libraries needed for parallel operation, and got a few<br>
&gt; errors from iptest:<br>
&gt;<br>
&gt; FAILED (failures=3)<br>
&gt; *****************************************************************************<br>
&gt; IPython test set: trial<br>
&gt; Traceback (most recent call last):<br>
&gt;   File &quot;/usr/lib/python2.6/dist-packages/twisted/python/usage.py&quot;, line 241,<br>
&gt; in<br>
&gt; parseOptions<br>
&gt;<br>
&gt; self.postOptions()<br>
&gt;   File &quot;/usr/lib/python2.6/dist-packages/twisted/scripts/trial.py&quot;, line<br>
&gt; 293, in<br>
&gt; postOptions<br>
&gt;     self[&#39;reporter&#39;] =<br>
&gt; self._loadReporterByName(self[&#39;reporter&#39;])<br>
&gt;   File &quot;/usr/lib/python2.6/dist-packages/twisted/scripts/trial.py&quot;, line<br>
&gt; 279, in<br>
&gt; _loadReporterByName<br>
&gt;     for p in<br>
&gt; plugin.getPlugins(itrial.IReporter):<br>
&gt;   File &quot;/usr/lib/python2.6/dist-packages/twisted/plugin.py&quot;, line 200, in<br>
&gt; getPlugins<br>
&gt;     allDropins =<br>
&gt; getCache(package)<br>
&gt; --- &lt;exception caught here&gt;<br>
&gt; ---<br>
&gt;   File &quot;/usr/lib/python2.6/dist-packages/twisted/plugin.py&quot;, line 179, in<br>
&gt; getCache<br>
&gt;<br>
&gt; dropinPath.setContent(pickle.dumps(dropinDotCache))<br>
&gt;   File &quot;/usr/lib/python2.6/dist-packages/twisted/python/filepath.py&quot;, line<br>
&gt; 623, in<br>
&gt; setContent<br>
&gt;     f =<br>
&gt; sib.open(&#39;w&#39;)<br>
&gt;   File &quot;/usr/lib/python2.6/dist-packages/twisted/python/filepath.py&quot;, line<br>
&gt; 433, in<br>
&gt; open<br>
&gt;     return open(self.path,<br>
&gt; mode+&#39;b&#39;)<br>
&gt; exceptions.IOError: [Errno 13] Permission denied:<br>
&gt; &#39;/usr/lib/python2.6/dist-packages/twisted/plugins/dropin.cache.new&#39;<br>
<br>
</div></div>This (in my opinion, although the twisted devs disagree) is a bug in<br>
twisted.  The first time you run twisted after installation it has to<br>
be run with sudo.  Just do:<br>
<br>
$ sudo trial<br>
# wait a while<br>
# sudo rm _trial_temp<br>
<br>
Then retry iptest:<br>
<br>
$ iptest<br>
<br>
And the twisted tests should run using trial.<br><div class="im"></div></blockquote><div><br>The first time I tried, it had no effect. I ran &quot;sudo trial ipython&quot; instead and then it got better.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">
&gt; and:<br>
&gt;<br>
&gt;     testStrictDict ... ERROR: An unexpected error occurred while tokenizing<br>
&gt; input<br>
&gt; The following traceback may be corrupted or<br>
&gt; invalid<br>
&gt; The error message is: (&#39;EOF in multi-line statement&#39;, (37, 0))<br>
&gt; --------<br>
<br>
</div>We know about this one.<br>
<div><div></div><div class="h5"><br>
&gt; Finally, I ran the following:<br>
&gt;<br>
&gt; $ iptest -v IPython.frontend<br>
&gt; /usr/lib/python2.6/dist-packages/foolscap/banana.py:2: DeprecationWarning:<br>
&gt; the sets module is<br>
&gt; deprecated<br>
&gt;   import struct, sets,<br>
&gt; time<br>
&gt; /usr/lib/python2.6/dist-packages/foolscap/vocab.py:2: DeprecationWarning:<br>
&gt; the sha module is deprecated; use the hashlib module<br>
&gt; instead<br>
&gt;   import<br>
&gt; sha<br>
&gt; Check that is_complete works. ...<br>
&gt; ok<br>
&gt; Tests line completion heuristic. ...<br>
&gt; ok<br>
&gt; Tests line completion heuristic. ...<br>
&gt; ok<br>
&gt; Tests line completion heuristic. ...<br>
&gt; ok<br>
&gt; IPython.frontend.tests.test_prefilterfrontend.test_capture ...<br>
&gt; ok<br>
&gt; IPython.frontend.tests.test_prefilterfrontend.test_completion_equal ...<br>
&gt; FAIL<br>
&gt; IPython.frontend.tests.test_prefilterfrontend.test_completion_indexing ...<br>
&gt; FAIL<br>
&gt; IPython.frontend.tests.test_prefilterfrontend.test_completion_parenthesis<br>
&gt; ... ok<br>
&gt; IPython.frontend.tests.test_prefilterfrontend.test_completion_simple ...<br>
&gt; ok<br>
&gt; IPython.frontend.tests.test_prefilterfrontend.test_execution ...<br>
&gt; FAIL<br>
&gt; IPython.frontend.tests.test_prefilterfrontend.test_help ...<br>
&gt; ok<br>
&gt; IPython.frontend.tests.test_prefilterfrontend.test_magic ...<br>
&gt; ok<br>
&gt; IPython.frontend.tests.test_prefilterfrontend.test_multiline ...<br>
&gt; ok<br>
&gt; A simple test to see if we can execute a process and get the output. ...<br>
&gt; ok<br>
&gt; Checks that we can send characters on stdin to the process. ...<br>
&gt; ok<br>
&gt; Check that we can kill a process, and its subprocess. ...<br>
&gt; ok<br>
&gt;<br>
&gt; ======================================================================<br>
&gt; FAIL: IPython.frontend.tests.test_prefilterfrontend.test_completion_equal<br>
&gt; ----------------------------------------------------------------------<br>
&gt; Traceback (most recent call last):<br>
&gt;   File &quot;/var/lib/python-support/python2.6/nose/case.py&quot;, line 182, in<br>
&gt; runTest<br>
&gt;     self.test(*self.arg)<br>
&gt;   File<br>
&gt; &quot;/home/darren/Projects/ipython/IPython/frontend/tests/test_prefilterfrontend.py&quot;,<br>
&gt; line 82, in my_func<br>
&gt;     out =<br>
&gt; func()<br>
&gt;   File<br>
&gt; &quot;/home/darren/Projects/ipython/IPython/frontend/tests/test_prefilterfrontend.py&quot;,<br>
&gt; line 241, in test_completion_equal<br>
&gt;     assert_equal(f.input_buffer, &#39;a=1.__&#39;)<br>
&gt; AssertionError: &#39;a=1.&#39; != &#39;a=1.__&#39;<br>
&gt;&gt;&gt;  raise self.failureException, \<br>
&gt;           (None or &#39;%r != %r&#39; % (&#39;a=1.&#39;, &#39;a=1.__&#39;))<br>
&gt;<br>
&gt;<br>
&gt; ======================================================================<br>
&gt; FAIL: IPython.frontend.tests.test_prefilterfrontend.test_completion_indexing<br>
&gt; ----------------------------------------------------------------------<br>
&gt; Traceback (most recent call last):<br>
&gt;   File &quot;/var/lib/python-support/python2.6/nose/case.py&quot;, line 182, in<br>
&gt; runTest<br>
&gt;     self.test(*self.arg)<br>
&gt;   File<br>
&gt; &quot;/home/darren/Projects/ipython/IPython/frontend/tests/test_prefilterfrontend.py&quot;,<br>
&gt; line 82, in my_func<br>
&gt;     out = func()<br>
&gt;   File<br>
&gt; &quot;/home/darren/Projects/ipython/IPython/frontend/tests/test_prefilterfrontend.py&quot;,<br>
&gt; line 231, in test_completion_indexing<br>
&gt;     assert_equal(f.input_buffer, &#39;a[0].__&#39;)<br>
&gt; AssertionError: &#39;a[0].&#39; != &#39;a[0].__&#39;<br>
&gt;&gt;&gt;  raise self.failureException, \<br>
&gt;           (None or &#39;%r != %r&#39; % (&#39;a[0].&#39;, &#39;a[0].__&#39;))<br>
&gt;<br>
&gt;<br>
&gt; ======================================================================<br>
&gt; FAIL: IPython.frontend.tests.test_prefilterfrontend.test_execution<br>
&gt; ----------------------------------------------------------------------<br>
&gt; Traceback (most recent call last):<br>
&gt;   File &quot;/var/lib/python-support/python2.6/nose/case.py&quot;, line 182, in<br>
&gt; runTest<br>
&gt;     self.test(*self.arg)<br>
&gt;   File<br>
&gt; &quot;/home/darren/Projects/ipython/IPython/frontend/tests/test_prefilterfrontend.py&quot;,<br>
&gt; line 82, in my_func<br>
&gt;     out = func()<br>
&gt;   File<br>
&gt; &quot;/home/darren/Projects/ipython/IPython/frontend/tests/test_prefilterfrontend.py&quot;,<br>
&gt; line 103, in test_execution<br>
&gt;     assert_equal(out_value, &#39;1\n&#39;)<br>
&gt; AssertionError: &#39;&gt;print(1)\n1\n&#39; != &#39;1\n&#39;<br>
&gt;&gt;&gt;  raise self.failureException, \<br>
&gt;           (None or &#39;%r != %r&#39; % (&#39;&gt;print(1)\n1\n&#39;, &#39;1\n&#39;))<br>
<br>
</div></div>Thanks, we are having lots of trouble with this test module.  Thought<br>
we got it solved, but I guess not.  Thanks!<font color="#888888"></font></blockquote><div><br>I updated this morning and ran iptest again. I see this towards the beginning:<br><br>======================================================================<br>
FAIL: IPython.frontend.tests.test_prefilterfrontend.test_completion_equal<br>----------------------------------------------------------------------   <br>Traceback (most recent call last):                                       <br>
  File &quot;/var/lib/python-support/python2.6/nose/case.py&quot;, line 182, in runTest<br>    self.test(*self.arg)                                                     <br>  File &quot;/home/darren/Projects/ipython/IPython/frontend/tests/test_prefilterfrontend.py&quot;, line 82, in my_func                                                                            <br>
    out = func()                                                                            <br>  File &quot;/home/darren/Projects/ipython/IPython/frontend/tests/test_prefilterfrontend.py&quot;, line 241, in test_completion_equal                                                             <br>
    assert_equal(f.input_buffer, &#39;a=1.__&#39;)                                                  <br>AssertionError: &#39;a=1.&#39; != &#39;a=1.__&#39;                                                          <br>&gt;&gt;  raise self.failureException, \                                                          <br>
          (None or &#39;%r != %r&#39; % (&#39;a=1.&#39;, &#39;a=1.__&#39;))                                         <br>                                                                                            <br><br>======================================================================<br>
FAIL: IPython.frontend.tests.test_prefilterfrontend.test_completion_indexing<br>----------------------------------------------------------------------      <br>Traceback (most recent call last):                                          <br>
  File &quot;/var/lib/python-support/python2.6/nose/case.py&quot;, line 182, in runTest<br>    self.test(*self.arg)                                                     <br>  File &quot;/home/darren/Projects/ipython/IPython/frontend/tests/test_prefilterfrontend.py&quot;, line 82, in my_func                                                                            <br>
    out = func()                                                                            <br>  File &quot;/home/darren/Projects/ipython/IPython/frontend/tests/test_prefilterfrontend.py&quot;, line 231, in test_completion_indexing                                                          <br>
    assert_equal(f.input_buffer, &#39;a[0].__&#39;)                                                 <br>AssertionError: &#39;a[0].&#39; != &#39;a[0].__&#39;                                                        <br>&gt;&gt;  raise self.failureException, \                                                          <br>
          (None or &#39;%r != %r&#39; % (&#39;a[0].&#39;, &#39;a[0].__&#39;))                                       <br>                                                                                            <br><br>======================================================================<br>
FAIL: IPython.frontend.tests.test_prefilterfrontend.test_execution    <br>----------------------------------------------------------------------<br>Traceback (most recent call last):                                    <br>
  File &quot;/var/lib/python-support/python2.6/nose/case.py&quot;, line 182, in runTest<br>    self.test(*self.arg)                                                     <br>  File &quot;/home/darren/Projects/ipython/IPython/frontend/tests/test_prefilterfrontend.py&quot;, line 82, in my_func                                                                            <br>
    out = func()                                                                            <br>  File &quot;/home/darren/Projects/ipython/IPython/frontend/tests/test_prefilterfrontend.py&quot;, line 103, in test_execution                                                                    <br>
    assert_equal(out_value, &#39;1\n&#39;)                                                          <br>AssertionError: &#39;&gt;print(1)\n1\n&#39; != &#39;1\n&#39;                                                   <br>&gt;&gt;  raise self.failureException, \                                                          <br>
          (None or &#39;%r != %r&#39; % (&#39;&gt;print(1)\n1\n&#39;, &#39;1\n&#39;))<br><br><br> And a lots of these later on:<br><br>/home/darren/Projects/ipython/IPython/kernel/error.py:127: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6 <br>
<br>No other errors to report.<br><br>Darren<br></div></div>