numpy.testing.decorators.skipif(skip_condition, msg=None)
[source]
Make function raise SkipTest exception if a given condition is true.
If the condition is a callable, it is used at runtime to dynamically make the decision. This is useful for tests that may require costly imports, to delay the cost until the test suite is actually executed.
Parameters: |
skip_condition : bool or callable Flag to determine whether to skip the decorated test. msg : str, optional Message to give on raising a SkipTest exception. Default is None. |
---|---|
Returns: |
decorator : function Decorator which, when applied to a function, causes SkipTest to be raised when |
The decorator itself is decorated with the nose.tools.make_decorator
function in order to transmit function name, and various other metadata.
© 2008–2017 NumPy Developers
Licensed under the NumPy License.
https://docs.scipy.org/doc/numpy-1.14.2/reference/generated/numpy.testing.decorators.skipif.html