[SciPy-Dev] [GSoC 2017] Nose to Pytest Migration - conclusions from previous thread

Nathaniel Smith njs at pobox.com
Sun Mar 12 11:09:50 EDT 2017


On Mar 12, 2017 7:56 AM, "Robert Kern" <robert.kern at gmail.com> wrote:

On Sun, Mar 12, 2017 at 12:19 AM, Karan Desai <karandesai281196 at gmail.com>
wrote:
> Plain assert keyword statements.

Just a note: numpy's test suite, at least, must not use `assert`
statements. numpy's test suite must be runnable under `python -O`. numpy
does some docstring manipulation that could fail in principle under those
conditions (i.e. it did fail at one point until we fixed it, so now we have
to ensure that it doesn't regress). scipy might have the same issue (e.g.
`scipy.special` ufuncs and `scipy.stats` distribution objects), but I
forget if we've made that a policy there too.

So if you mean, by this requirement, that we convert all of our
`assert_equal(x, y)` calls to `assert x == y`, no, we won't be doing that,
even in the cases where it would be possible.


Pytest arranges for assert statements in test modules to be run even if
Python has assert statements disabled in general. See

http://doc.pytest.org/en/latest/announce/release-2.1.0.html

-n
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20170312/ffd78fc3/attachment.html>


More information about the SciPy-Dev mailing list