def test_skip_if(condition, reason): """Skip test if condition is true This decorator is used by Python v2.6 code to keep compatible with Python v2.7 (and later) unittest.skipIf. """ if condition: return test_skip(reason) return _id