Fail unless the given callable throws the specified warning.
A warning of class warning_class should be thrown by the callable when invoked with arguments args and keyword arguments kwargs. If a different type of warning is thrown, it will not be caught, and the test case will be deemed to have suffered an error.
Parameters : | warning_class : class
func : callable
*args : Arguments
**kwargs : Kwargs
|
---|---|
Returns : | The value returned by `func`. : |