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 <[email protected]>
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 <
> [email protected]> wrote:
>
>> BTW:
>>
>> with pytest.raises(AnException):
>>     ....
>>
>> Is another nice feature.
>>
>> -CHB
>> _______________________________________________
>> NumPy-Discussion mailing list
>> [email protected]
>> https://mail.python.org/mailman/listinfo/numpy-discussion
>>
> _______________________________________________
> NumPy-Discussion mailing list
> [email protected]
> https://mail.python.org/mailman/listinfo/numpy-discussion
>
_______________________________________________
NumPy-Discussion mailing list
[email protected]
https://mail.python.org/mailman/listinfo/numpy-discussion

Reply via email to