[IPython-dev] Cython magics crashes test suite when cython not present

MinRK benjaminrk at gmail.com
Thu May 31 13:04:29 EDT 2012


On Thu, May 31, 2012 at 9:51 AM, Fernando Perez <fperez.net at gmail.com>wrote:

> On Thu, May 31, 2012 at 9:44 AM, MinRK <benjaminrk at gmail.com> wrote:
>
> > It might be related to the fact that it's in the tests dir.  I don't
> think
> > we've excluded a *test* file before, always real code / dirs.
>
> Well, we do have these that exclude things like test_mongodb.py and
> test_pylabtools.py:
>
>    if not have['pymongo']:
>        exclusions.append(ipjoin('parallel', 'controller', 'mongodb'))
>        exclusions.append(ipjoin('parallel', 'tests', 'test_mongodb'))
>
>    if not have['matplotlib']:
>        exclusions.extend([ipjoin('core', 'pylabtools'),
>                           ipjoin('core', 'tests', 'test_pylabtools'),
>                           ipjoin('zmq', 'pylab'),
>
>
> and those have worked so far.  I just confirmed that they work indeed
> by running the test suite for IPython.core with a '1/0' in the
> test_pylabtools.py file, and I get what I expect:
>
> - in a venv that's missing matplotlib, the test_pylabtools is skipped
> and thus the whole test suite passes cleanly.
>
> - in my normal environment that finds matplotlib, that 1/0 makes it
> blow up with an error as expected.
>
> So the exclusion for a single test file does seem to work OK from this
> check...
>

I apologize if this is obvious, but are we aware that the test_cythonmagic
file is *not* excluded in master?

    if not have['cython']:
        exclusions.extend([ipjoin('extensions', 'cythonmagic')])

should be:

    if not have['cython']:
        exclusions.extend([ipjoin('extensions', 'cythonmagic')])
        exclusions.extend([ipjoin('extensions', 'tests',
'test_cythonmagic')])

With this addition, and a manually disabled Cython, testing works fine for
me.

And Fernando, if you look carefully at your log, the excluded and included
files are not actually the same.

-MinRK


>
> Puzzled...
>
> f
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20120531/7fd8b583/attachment.html>


More information about the IPython-dev mailing list