def setastest(tf=True):
    def set_test(t):
        t.__test__ = tf
        return t
    return set_test
Signals to nose that this function is or is not a test.
dataset/ETHPy150Open ipython/ipython-py3k/IPython/external/decorators/_decorators.py/setastest