[IPython-user] [Pytables-users] Failing tests with 2.0rc1

Francesc Altet faltet@carabos....
Mon Aug 13 03:42:36 CDT 2007


A Monday 13 August 2007, Fernando Perez escrigué:
> On 4/26/07, Fernando Perez <fperez.net@gmail.com> wrote:
> > On 4/26/07, Francesc Altet <faltet@carabos.com> wrote:
> > > El dj 26 de 04 del 2007 a les 09:28 -0600, en/na Brian Granger va
> > >
> > > escriure:
> > > > Hi all,
> > > >
> > > > Also forwarding this to ipython-dev.
> > > >
> > > > I reran the pytables test suite under regular python (not IPython)
> > > > and all tests pass!
> > > >
> > > > For the IPython devs, the issue is that the pytables tests suite
> > > > (which uses doctest) fails under ipython, but passes under regular
> > > > python.
> > >
> > > To be more specific, PyTables uses mainly the unittest module for the
> > > test suite, but with some excerpts of 'doctests' sparsed in the middle,
> > > and these are the ones that are creating the problems.
> > >
> > > > I think Robert Kern's thoughts about what is going on is probably
> > > > correct:
> > > >
> > > > http://mail.python.org/pipermail/python-list/2006-April/377902.html
> > > >
> > > > I will bring this up at the ipython sprint this weekend.
> >
> > Yup, I've been aware of this problem for a while now.  We'll think
> > about a clean solution...
>
> As I mentioned in a separate email (that didn't cc the list), this
> should now be fixed in current IPython SVN.  There's a test release
> here, for those not running from SVN:
>
> http://ipython.scipy.org/dist/testing/
>
> Please report any failures.  I now consider doctest 'supported', so if
> it doesn't work, it's a bug.
>
> cheers,
>
> f

I've run the tests from inside of IPython and yes, the issue seems to be fixed 
now (at least on the Linux side).  Many thanks!

Just a little quirk though.  When I run the tests in command line mode, i.e.:

$ PYTHONPATH=. ipython tables/tests/test_all.py

the tests finish correctly, but IPython doesn't apparently think so:

[snip]
----------------------------------------------------------------------
Ran 5926 tests in 126.524s

OK
---------------------------------------------------------------------------
SystemExit                                Traceback (most recent call last)

/home/faltet/PyTables/pytables/trunk/tables/tests/test_all.py in <module>()
    187     if not only_versions:
    188         print_heavy(common.heavy)
--> 189         unittest.main(defaultTest='tables.tests.suite')
    190 
    191 

/home/faltet/PyTables/pytables/trunk/unittest.py in __init__(self, module, 
defaultTest, argv, testRunner, testLoader)
    766         self.progName = os.path.basename(argv[0])
    767         self.parseArgs(argv)
--> 768         self.runTests()
    769 
    770     def usageExit(self, msg=None):

/home/faltet/PyTables/pytables/trunk/unittest.py in runTests(self)
    804             self.testRunner = TextTestRunner(verbosity=self.verbosity)
    805         result = self.testRunner.run(self.test)
--> 806         sys.exit(not result.wasSuccessful())
    807 
    808 main = TestProgram

SystemExit: False
WARNING: Failure executing file: <tables/tests/test_all.py>
Python 2.5.1 (r251:54863, May  2 2007, 16:56:35) 
Type "copyright", "credits" or "license" for more information.

IPython 0.8.2.svn.r2601 -- An enhanced Interactive Python.
?       -> Introduction to IPython's features.
%magic  -> Information about IPython's 'magic' % functions.
help    -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.

In [1]: 

I've checked that test_all.py returns a value of 0 when it exits (i.e. $? 
variable has a 0 value, as it should).  Perhaps IPython is (wrongly) assuming 
that returning a 0 is a failure instead of success?

And another small thing (the last one for today, I promise ;).  I've installed 
IPython from the nightly built eggs that you are providing recently (very 
good job! BTW, how are you generating the Windows binary automatically?  I'd 
like to do the same with PyTables), and a couple of errors appear during the 
installation:

$ sudo easy_install ipython-0.8.2.svn.r2601
ipython-0.8.2.svn.r2601-py2.5.egg  ipython-0.8.2.svn.r2601.tar.gz
faltet@inspiron:~/python.nobackup$ sudo easy_install 
ipython-0.8.2.svn.r2601-py2.5.egg 
Processing ipython-0.8.2.svn.r2601-py2.5.egg
creating /usr/lib/python2.5/site-packages/ipython-0.8.2.svn.r2601-py2.5.egg
Extracting ipython-0.8.2.svn.r2601-py2.5.egg 
to /usr/lib/python2.5/site-packages
  
File "/usr/lib/python2.5/site-packages/ipython-0.8.2.svn.r2601-py2.5.egg/IPython/Extensions/foo.py", 
line 2
    >>> range(5, 10)
     ^
SyntaxError: invalid syntax

  
File "/usr/lib/python2.5/site-packages/ipython-0.8.2.svn.r2601-py2.5.egg/share/doc/ipython-0.8.2.svn.r2601/examples/extension.py", 
line 6
    def ${name}_f(self, arg):
        ^
SyntaxError: invalid syntax

Adding ipython 0.8.2.svn.r2601 to easy-install.pth file
Installing ipython script to /usr/bin
Installing pycolor script to /usr/bin

Installed /usr/lib/python2.5/site-packages/ipython-0.8.2.svn.r2601-py2.5.egg
Processing dependencies for ipython==0.8.2.svn.r2601

I've checked that these errors are non-fatal (my IPython installation seems to 
work just fine), but I thought that it would be worth to keep you informed.

Thanks again for delivering, improving and maintaining such a poweful 
interpreter!

-- 
>0,0<   Francesc Altet     http://www.carabos.com/
V   V   Cárabos Coop. V.   Enjoy Data
 "-"


More information about the IPython-user mailing list