numpy.testing.dec.setastest#
- testing.dec.setastest(tf=True)[source]#
Deprecated since version 1.21: This decorator is retained for compatibility with the nose testing framework, which is being phased out. Please use the nose2 or pytest frameworks instead.
Signals to nose that this function is or is not a test.
- Parameters
- tfbool
If True, specifies that the decorated callable is a test. If False, specifies that the decorated callable is not a test. Default is True.
Notes
This decorator can’t use the nose namespace, because it can be called from a non-test module. See also
istest
andnottest
innose.tools
.Examples
setastest
can be used in the following way:from numpy.testing import dec @dec.setastest(False) def func_with_test_in_name(arg1, arg2): pass