def skip_if_null(test_func):

    if _is_current_backend('null'):
        # preserve original name so that it appears in the report
        orig_name = test_func.__name__
        def test_func():
            raise nose.SkipTest
        test_func.__name__ = orig_name

    return test_func
Decorator that skip tests if the backend is set to 'null'.
dataset/ETHPy150Open enthought/traitsui/traitsui/tests/_tools.py/skip_if_null