Source code for nltk.test.unit.utils

# -*- coding: utf-8 -*-
from __future__ import absolute_import
from unittest import TestCase
from functools import wraps
from nose.plugins.skip import SkipTest
from nltk.util import py26




[docs]def skipIf(condition, reason): """ Skip a test if the condition is true. """ if condition: return skip(reason) return lambda obj: obj