[Numpy-discussion] pytest, fixture and parametrize

Evgeni Burovski evgeny.burovskiy at gmail.com
Wed Aug 8 12:38:04 EDT 2018


This is actually available from both nose (old-style np.testing framework),
and pytest. Stdlib unittest supports self.assertRaises context manager from
python 3.1

On Wed, Aug 8, 2018, 7:30 PM Eric Wieser <wieser.eric+numpy at gmail.com>
wrote:

> Is another nice feature
>
> You forget that we already have that feature in our testing layer,
>
> with np.testing.assert_raises(AnException):
>     pass
>
>>
> On Wed, 8 Aug 2018 at 09:08 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
>>
> _______________________________________________
> 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/d681976b/attachment.html>


More information about the NumPy-Discussion mailing list