assert_raises¶
- assert_raises(exception_class)¶
Checks for an exception to be raised.
Similar to numpy.testing.assert_raises.
- Parameters:
- exception_classException
Exception type
Examples
>>> import openturns as ot >>> import openturns.testing as ott >>> with ott.assert_raises(ValueError): ... raise ValueError