[Numpy-discussion] pytest, fixture and parametrize

Stephan Hoyer shoyer at gmail.com
Wed Aug 8 20:15:29 EDT 2018


On Wed, Aug 8, 2018 at 9:25 AM Tyler Reddy <tyler.je.reddy at gmail.com> wrote:

> +1 for pytest parametrization and some of the more straight forward
> context managers like pytest.raises and so on
>

+1 from me, too.


> +0.5 for the fancy fixture stuff in pytest (have to concede that this
> stuff can be really hard to reason about sometimes,
> especially with custom scoping decorators, but if it helps to mock
> something like recently-discovered network dependency
> for some unit tests it may be better than adding a new dependency or
> reimplementing effectively the same thing)
>

I'm -0 on fixtures, but unfortunately there don't seem to be viable
alternatives in pytest. I find the way that pytest automatically match
*argument names* with the names of fixtures very distasteful and
un-Pythonic.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20180808/53520e3a/attachment.html>


More information about the NumPy-Discussion mailing list