[Numpy-discussion] pytest, fixture and parametrize

Tyler Reddy tyler.je.reddy at gmail.com
Wed Aug 8 12:25:23 EDT 2018


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

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

On Wed, 8 Aug 2018 at 09:09, Chris Barker - NOAA Federal <
chris.barker at noaa.gov> wrote:

> BTW:
>
> with pytest.raises(AnException):
>     ....
>
> Is another nice feature.
>
> -CHB
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at python.org
> https://mail.python.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20180808/9543ad72/attachment-0001.html>


More information about the NumPy-Discussion mailing list