[IPython-dev] Please help test ipython trunk

Darren Dale dsdale24@gmail....
Sun Apr 26 07:59:52 CDT 2009


Hi Brian,

On Sat, Apr 25, 2009 at 11:19 PM, Brian Granger <ellisonbg.net@gmail.com>wrote:

> 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.


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.


> 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.
>

The first time I tried, it had no effect. I ran "sudo trial ipython" instead
and then it got better.


> > 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!


I updated this morning and ran iptest again. I see this towards the
beginning:

======================================================================
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'))


 And a lots of these later on:

/home/darren/Projects/ipython/IPython/kernel/error.py:127:
DeprecationWarning: BaseException.message has been deprecated as of Python
2.6

No other errors to report.

Darren
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20090426/745e8871/attachment-0001.html 


More information about the IPython-dev mailing list