[SciPy-Dev] Need to filter DeprecationWarnings in the tests?

Warren Weckesser warren.weckesser at gmail.com
Fri Sep 8 14:36:06 EDT 2017


On Fri, Sep 8, 2017 at 2:16 PM, Pauli Virtanen <pav at iki.fi> wrote:

> pe, 2017-09-08 kello 13:03 -0400, Warren Weckesser kirjoitti:
> > On Fri, Sep 8, 2017 at 11:16 AM, Sebastian Berg <sebastian at sipsolutio
> > ns.net>
> > wrote:
> >
> > > Not sure how it is set up with pytest, but without pytest it was
> > > set
> > > up, so that DeprecationWarning are raised during development
> > > testing
> > > (so that upstream changes are loud) and printed in release
> > > versions.
> > >
> > > I think that is not really a bad setup, so likely it is/would also
> > > be
> > > used with pytest?
> >
> > Looks like it still works that way.  I had been running the tests
> > using the
> > 'test()' functions (e.g. 'from scipy import stats;
> > stats.test("full")'),
> > and those ignore the DeprecationWarnings by default.
>
> With pytest, we apply the default development settings by having a
> pytest.ini in the repository. It applies if you use runtests.py (maybe
> with the -n option) or use inplace builds or otherwise launch pytest
> from under the repository dir, but not when otherwise running tests
> from an installed module elsewhere.
>
>

Will

python runtests.py -s stats

use the development settings?


Warren



This seemed to me to be the "pytest way", and it appeared best to not
> add more detailed hacks trying to fight the tool (currently, the test()
> have minimal customization, and it seems to me to be for the best to
> keep them as close as possible to the pytest command line usage).
>
>         Pauli
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at python.org
> https://mail.python.org/mailman/listinfo/scipy-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20170908/2e9a37fa/attachment.html>


More information about the SciPy-Dev mailing list