[IPython-dev] Please help test ipython trunk

Brian Granger ellisonbg.net@gmail....
Sat Apr 25 22:19:28 CDT 2009


Darren,

Thanks for running this.  As you can see, our testing stuff is a mess
right now.  Due to some subtle things about nose and Twisted, you
definitely need to use iptest to run our test suite.  See below for a
few specific comments though

> I installed the libraries needed for parallel operation, and got a few
> errors from iptest:
>
> FAILED (failures=3)
> *****************************************************************************
> IPython test set: trial
> Traceback (most recent call last):
>   File "/usr/lib/python2.6/dist-packages/twisted/python/usage.py", line 241,
> in
> parseOptions
>
> self.postOptions()
>   File "/usr/lib/python2.6/dist-packages/twisted/scripts/trial.py", line
> 293, in
> postOptions
>     self['reporter'] =
> self._loadReporterByName(self['reporter'])
>   File "/usr/lib/python2.6/dist-packages/twisted/scripts/trial.py", line
> 279, in
> _loadReporterByName
>     for p in
> plugin.getPlugins(itrial.IReporter):
>   File "/usr/lib/python2.6/dist-packages/twisted/plugin.py", line 200, in
> getPlugins
>     allDropins =
> getCache(package)
> --- <exception caught here>
> ---
>   File "/usr/lib/python2.6/dist-packages/twisted/plugin.py", line 179, in
> getCache
>
> dropinPath.setContent(pickle.dumps(dropinDotCache))
>   File "/usr/lib/python2.6/dist-packages/twisted/python/filepath.py", line
> 623, in
> setContent
>     f =
> sib.open('w')
>   File "/usr/lib/python2.6/dist-packages/twisted/python/filepath.py", line
> 433, in
> open
>     return open(self.path,
> mode+'b')
> exceptions.IOError: [Errno 13] Permission denied:
> '/usr/lib/python2.6/dist-packages/twisted/plugins/dropin.cache.new'

This (in my opinion, although the twisted devs disagree) is a bug in
twisted.  The first time you run twisted after installation it has to
be run with sudo.  Just do:

$ sudo trial
# wait a while
# sudo rm _trial_temp

Then retry iptest:

$ iptest

And the twisted tests should run using trial.

> and:
>
>     testStrictDict ... ERROR: An unexpected error occurred while tokenizing
> input
> The following traceback may be corrupted or
> invalid
> The error message is: ('EOF in multi-line statement', (37, 0))
> --------

We know about this one.

> Finally, I ran the following:
>
> $ iptest -v IPython.frontend
> /usr/lib/python2.6/dist-packages/foolscap/banana.py:2: DeprecationWarning:
> the sets module is
> deprecated
>   import struct, sets,
> time
> /usr/lib/python2.6/dist-packages/foolscap/vocab.py:2: DeprecationWarning:
> the sha module is deprecated; use the hashlib module
> instead
>   import
> sha
> Check that is_complete works. ...
> ok
> Tests line completion heuristic. ...
> ok
> Tests line completion heuristic. ...
> ok
> Tests line completion heuristic. ...
> ok
> IPython.frontend.tests.test_prefilterfrontend.test_capture ...
> ok
> IPython.frontend.tests.test_prefilterfrontend.test_completion_equal ...
> FAIL
> IPython.frontend.tests.test_prefilterfrontend.test_completion_indexing ...
> FAIL
> IPython.frontend.tests.test_prefilterfrontend.test_completion_parenthesis
> ... ok
> IPython.frontend.tests.test_prefilterfrontend.test_completion_simple ...
> ok
> IPython.frontend.tests.test_prefilterfrontend.test_execution ...
> FAIL
> IPython.frontend.tests.test_prefilterfrontend.test_help ...
> ok
> IPython.frontend.tests.test_prefilterfrontend.test_magic ...
> ok
> IPython.frontend.tests.test_prefilterfrontend.test_multiline ...
> ok
> A simple test to see if we can execute a process and get the output. ...
> ok
> Checks that we can send characters on stdin to the process. ...
> ok
> Check that we can kill a process, and its subprocess. ...
> ok
>
> ======================================================================
> FAIL: IPython.frontend.tests.test_prefilterfrontend.test_completion_equal
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/var/lib/python-support/python2.6/nose/case.py", line 182, in
> runTest
>     self.test(*self.arg)
>   File
> "/home/darren/Projects/ipython/IPython/frontend/tests/test_prefilterfrontend.py",
> line 82, in my_func
>     out =
> func()
>   File
> "/home/darren/Projects/ipython/IPython/frontend/tests/test_prefilterfrontend.py",
> line 241, in test_completion_equal
>     assert_equal(f.input_buffer, 'a=1.__')
> AssertionError: 'a=1.' != 'a=1.__'
>>>  raise self.failureException, \
>           (None or '%r != %r' % ('a=1.', 'a=1.__'))
>
>
> ======================================================================
> FAIL: IPython.frontend.tests.test_prefilterfrontend.test_completion_indexing
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/var/lib/python-support/python2.6/nose/case.py", line 182, in
> runTest
>     self.test(*self.arg)
>   File
> "/home/darren/Projects/ipython/IPython/frontend/tests/test_prefilterfrontend.py",
> line 82, in my_func
>     out = func()
>   File
> "/home/darren/Projects/ipython/IPython/frontend/tests/test_prefilterfrontend.py",
> line 231, in test_completion_indexing
>     assert_equal(f.input_buffer, 'a[0].__')
> AssertionError: 'a[0].' != 'a[0].__'
>>>  raise self.failureException, \
>           (None or '%r != %r' % ('a[0].', 'a[0].__'))
>
>
> ======================================================================
> FAIL: IPython.frontend.tests.test_prefilterfrontend.test_execution
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/var/lib/python-support/python2.6/nose/case.py", line 182, in
> runTest
>     self.test(*self.arg)
>   File
> "/home/darren/Projects/ipython/IPython/frontend/tests/test_prefilterfrontend.py",
> line 82, in my_func
>     out = func()
>   File
> "/home/darren/Projects/ipython/IPython/frontend/tests/test_prefilterfrontend.py",
> line 103, in test_execution
>     assert_equal(out_value, '1\n')
> AssertionError: '>print(1)\n1\n' != '1\n'
>>>  raise self.failureException, \
>           (None or '%r != %r' % ('>print(1)\n1\n', '1\n'))

Thanks, we are having lots of trouble with this test module.  Thought
we got it solved, but I guess not.  Thanks!

Brian


More information about the IPython-dev mailing list