diff --git a/IPython/testing/decorators_numpy.py b/IPython/testing/decorators_numpy.py index dd9783e..42727f2 100644 --- a/IPython/testing/decorators_numpy.py +++ b/IPython/testing/decorators_numpy.py @@ -46,13 +46,16 @@ def setastest(tf=True): return t return set_test -def skipif(skip_condition, msg=None): +def skipif(skip_condition=True, msg=None): ''' Make function raise SkipTest exception if skip_condition is true Parameters --------- - skip_condition : bool - Flag to determine whether to skip test (True) or not (False) + skip_condition : bool or callable. + Flag to determine whether to skip test. 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. msg : string Message to give on raising a SkipTest exception