[IPython-dev] Cython magics crashes test suite when cython not present
MinRK
benjaminrk at gmail.com
Thu May 31 14:40:31 EDT 2012
Anyone else seeing this test failure:
ImportError: Building module _test_cython_pyximport failed:
["DistutilsSetupError: each element of 'ext_modules' option must be an
Extension instance or 2-tuple\n"]
?
The reason being that Extension has changed due to autoreload, and an
isinstance check in distutils is failing as a result.
I can confirm that it is autoreload-related, because the tests pass in
isolation, but if I run an autoreload test *in between* cython tests, I see
the above failure:
$> iptest IPython.extensions.cythonmagic
IPython.extensions.tests.test_autoreload
IPython.extensions.tests.test_cythonmagic
I don't know enough to be sure whether this is a bug in autoreload, or a
conflict with pyximport, or what.
The autoreload tests should probably not be allowed to run in the same
process as the rest of the suite.
-MinRK
On Thu, May 31, 2012 at 10:21 AM, Fernando Perez <fperez.net at gmail.com>wrote:
> On Thu, May 31, 2012 at 10:04 AM, MinRK <benjaminrk at gmail.com> wrote:
> > 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.
>
> Yes, I'd noticed that, but in my local testing I still get the problem
> even with that fix.
>
> In fact, this is what I have:
>
> if not have['cython']:
> exclusions.extend([ipjoin('extensions', 'cythonmagic')])
> exclusions.extend([ipjoin('extensions', 'cythonmagic.py')])
> exclusions.extend([ipjoin('extensions', 'test',
> 'test_cythonmagic')])
> exclusions.extend([ipjoin('extensions', 'test',
> 'test_cythonmagic.py')])
>
> ARGGHHH!!! Nevermind, I fixed the exclusions list with 'test' not
> 'tests' as the subdir. I'm a moron.
>
> 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/86a08682/attachment.html>
More information about the IPython-dev
mailing list