[IPython-dev] Closing in on 0.11? We need some review/feedback help

Fernando Perez fperez.net at gmail.com
Wed Jan 13 11:40:09 EST 2010


Hi,

Thanks for the feedback! Comments below.

On Wed, Jan 13, 2010 at 6:56 AM, Mikhail Terekhov <termim at gmail.com> wrote:
> Hi,
>
> I've downloaded ipython-0.11.bzr.r1321.tar.gz and run
>
> cd ipython-0.11.bzr.r1321/IPython/scripts
> ./iptest -v IPython.utils
>
> as suggested in the new testing documentation and got an exception:
>
> Failure: AttributeError ('module' object has no attribute 'utils') ... ERROR
>
> ======================================================================
> ERROR: Failure: AttributeError ('module' object has no attribute 'utils')
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File "/usr/lib64/python2.5/site-packages/nose/loader.py", line 368,
> in loadTestsFromName
>    module = resolve_name(addr.module)
>  File "/usr/lib64/python2.5/site-packages/nose/util.py", line 344, in
> resolve_name
>    obj = getattr(obj, part)
> AttributeError: 'module' object has no attribute 'utils'
>
> ----------------------------------------------------------------------
> Ran 1 test in 0.001s
>
> FAILED (errors=1)

This looks like it's picking up an older version of IPython.

If you simply start ipython, you should see the new version number, do
you get that?  Something like

maqroll[~]> ipython
Python 2.6.4 (r264:75706, Dec  7 2009, 18:45:15)
Type "copyright", "credits" or "license" for more information.

IPython 0.11.bzr.r1321 -- An enhanced Interactive Python.

> Then I tried ./iptest -v and got two failures:
> ======================================================================
> FAIL: Test that prompts correctly generate after %run
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File "/usr/lib64/python2.5/site-packages/nose/case.py", line 183, in runTest
>    self.test(*self.arg)
>  File "/usr/lib64/python2.5/site-packages/IPython/tests/test_magic.py",
> line 250, in test_prompts
>    nt.assert_equals(p2[:3], '...')
> AssertionError: '\x01\x1b[' != '...'
>>>  raise self.failureException, \
>          (None or '%r != %r' % ('\x01\x1b[', '...'))
>
>
> ======================================================================
> FAIL: Test that object's __del__ methods are called on exit.
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File "/usr/lib64/python2.5/site-packages/nose/case.py", line 183, in runTest
>    self.test(*self.arg)
>  File "/usr/lib64/python2.5/site-packages/IPython/tests/test_magic.py",
> line 72, in test_obj_del
>    nt.assert_equals(out,'obj_del.py: object A deleted')
> AssertionError: '\x1b[?1034hobj_del.py: object A deleted' !=
> 'obj_del.py: object A deleted'
>>>  raise self.failureException, \
>          (None or '%r != %r' % ('\x1b[?1034hobj_del.py: object A
> deleted', 'obj_del.py: object A deleted'))
>
>
> ----------------------------------------------------------------------
> Ran 148 tests in 2.476s
>
> FAILED (SKIP=13, failures=2)
> obj_del.py: object A deleted

Mmh, I just realized that iptest is a bit brittle against 'naked'
calls with flags but no module arguments.  Try without the -v, just

./iptest

and let us know how it goes.

I'm a bit puzzled that it's showing those prompt control sequences
there, we start our test instances in no color mode...

> BTW I run python 2.5.2  on SuSE 11.0 x86-64

Thanks again for the info, this is very useful.  It's exactly the kind
of feedback we need.

Cheers,

f



More information about the IPython-dev mailing list