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

Karan Desai karandesai281196 at gmail.com
Sun Mar 12 16:47:57 EDT 2017


Okay, so I'll clarify one thing based on all the suggestions above:
Rewrting assert methods as statements will not be a part of my proposal. I am
talking about mainly two things here - one is about numpy testing utils, which
will be used by other libraries directly (like assert array methods), and other
is about the test suite of scipy and numpy itself, comprising of unit tests of
these two libraries itself.
My idea is to keep the former as much independent of testing framework as
possible, while adopt pytest flavor (viz. fixtures and parametrization) for the
latter.
>  And speaking of the proposal, I think it's time to see the first draft.
Sure, coming up soon.
Regards,Karan.  





On Sun, Mar 12, 2017 10:13 PM, Evgeni Burovski evgeny.burovskiy at gmail.com 
wrote:
On Sun, Mar 12, 2017 at 6:19 PM, Robert Kern <robert.kern at gmail.com> wrote:

> On Sun, Mar 12, 2017 at 8:09 AM, Nathaniel Smith <njs at pobox.com> wrote:

>>

>> 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

>

> Neat!

>

> Nonetheless, converting the current tests to use `assert` statements is

> hardly a requirement, just something that might be enabled by the

> transition.

>

> --

> Robert Kern







And since the subject is inevitably going to show up more then once, I

think the GSoC proposal should explicitly mention that assert

rewriting is not a part of the GSoC. And speaking of the proposal, I

think it's time to see the first draft.




Evgeni

_______________________________________________

SciPy-Dev mailing list

SciPy-Dev at scipy.org

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


More information about the SciPy-Dev mailing list