From: Francesc A. <fa...@ca...> - 2007-08-13 11:36:24
|
A Monday 13 August 2007, Fernando Perez escrigu=E9: > On 4/26/07, Fernando Perez <fpe...@gm...> wrote: > > On 4/26/07, Francesc Altet <fa...@ca...> 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 middl= e, > > > 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 fi= xed=20 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= =2E: $ PYTHONPATH=3D. ipython tables/tests/test_all.py the tests finish correctly, but IPython doesn't apparently think so: [snip] =2D--------------------------------------------------------------------- Ran 5926 tests in 126.524s OK =2D------------------------------------------------------------------------= =2D- 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) =2D-> 189 unittest.main(defaultTest=3D'tables.tests.suite') 190=20 191=20 /home/faltet/PyTables/pytables/trunk/unittest.py in __init__(self, module,= =20 defaultTest, argv, testRunner, testLoader) 766 self.progName =3D os.path.basename(argv[0]) 767 self.parseArgs(argv) =2D-> 768 self.runTests() 769=20 770 def usageExit(self, msg=3DNone): /home/faltet/PyTables/pytables/trunk/unittest.py in runTests(self) 804 self.testRunner =3D TextTestRunner(verbosity=3Dself.ver= bosity) 805 result =3D self.testRunner.run(self.test) =2D-> 806 sys.exit(not result.wasSuccessful()) 807=20 808 main =3D TestProgram SystemExit: False WARNING: Failure executing file: <tables/tests/test_all.py> Python 2.5.1 (r251:54863, May 2 2007, 16:56:35)=20 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]:=20 I've checked that test_all.py returns a value of 0 when it exits (i.e. $?=20 variable has a 0 value, as it should). Perhaps IPython is (wrongly) assumi= ng=20 that returning a 0 is a failure instead of success? And another small thing (the last one for today, I promise ;). I've instal= led=20 IPython from the nightly built eggs that you are providing recently (very=20 good job! BTW, how are you generating the Windows binary automatically? I'= d=20 like to do the same with PyTables), and a couple of errors appear during th= e=20 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=20 ipython-0.8.2.svn.r2601-py2.5.egg=20 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=20 to /usr/lib/python2.5/site-packages =20 =46ile "/usr/lib/python2.5/site-packages/ipython-0.8.2.svn.r2601-py2.5.egg/= IPython/Extensions/foo.py",=20 line 2 >>> range(5, 10) ^ SyntaxError: invalid syntax =20 =46ile "/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",=20 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=3D=3D0.8.2.svn.r2601 I've checked that these errors are non-fatal (my IPython installation seems= to=20 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=20 interpreter! =2D-=20 >0,0< Francesc Altet =A0 =A0 http://www.carabos.com/ V V C=E1rabos Coop. V. =A0=A0Enjoy Data "-" |