[SciPy-Dev] FAILED (KNOWNFAIL=11, SKIP=39, errors=6, failures=1), py27 64bit osx

Ralf Gommers ralf.gommers at googlemail.com
Tue Jun 29 09:08:35 EDT 2010


On Tue, Jun 29, 2010 at 3:30 AM, Vincent Davis <vincent at vincentdavis.net>wrote:

> On Mon, Jun 28, 2010 at 10:02 AM, Ralf Gommers
>
> It would seem to me that the set should fail.
> def test_none(self):
>        """Ticket #1124."""
>        signal.medfilt(None)
>
> Not sure how to do this but I guess it is possible that the error is
> not a sigfualt or medfilt could return a more meaningful error because
> None is not a good argument. Volume=None > gets converted with
> numpy.atleast_1d(*arys) which returns array([None], dtype=object).
>
> So should the test use an expect exception? Or whats the fix?
>
> I don't get an exception on 32-bit OS X. Looking at the test, the only
purpose seems to be to ensure there's no segfault. There are probably loads
of functions that do strange things when you feed them object arrays with
None or something more random inside - no point checking for that in the
function. So to fix the test, maybe simply:

def test_none(self):
    """Ticket #1124. Ensure this does not segfault."""
    try:
        signal.medfilt(None)
    except:
        pass

Cheers,
Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20100629/ae435f8b/attachment.html>


More information about the SciPy-Dev mailing list