On this page
numpy.testing.dec.knownfailureif
testing.dec.knownfailureif(fail_condition, msg=None)[source]- 
    
Make function raise KnownFailureException exception if 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
 - 
      
fail_conditionbool or callable- 
        
Flag to determine whether to mark the decorated test as a known failure (if True) or not (if False).
 msgstr, optional- 
        
Message to give on raising a KnownFailureException exception. Default is None.
 
 - Returns
 - 
      
decoratorfunction- 
        
Decorator, which, when applied to a function, causes KnownFailureException to be raised when
fail_conditionis True, and the function to be called normally otherwise. 
 
Notes
The decorator itself is decorated with the
nose.tools.make_decoratorfunction in order to transmit function name, and various other metadata. 
© 2005–2021 NumPy Developers
Licensed under the 3-clause BSD License.
 https://numpy.org/doc/1.20/reference/generated/numpy.testing.dec.knownfailureif.html