Did I find the right examples for you? yes no

All Samples(215)  |  Call(4)  |  Derive(0)  |  Import(211)
Skip a test if the condition is true.

        def skipIf(condition, reason):
    """
    Skip a test if the condition is true.
    """
    if condition:
        return skip(reason)
    return _id
        


src/h/u/hunch-sample-app-HEAD/django/contrib/messages/tests/base.py   hunch-sample-app(Download)
from django.conf import settings
from django.utils.translation import ugettext_lazy
from django.utils.unittest import skipIf
from django.contrib.messages import constants, utils, get_level, set_level
from django.contrib.messages.api import MessageFailure

src/y/a/yawf-0.10.2/yawf_sample/simple/tests.py   yawf(Download)
from django.test import TestCase
from django.utils.unittest import skipIf
import reversion
 
import yawf

src/y/a/yawf-HEAD/yawf_sample/simple/tests.py   yawf(Download)
from django.test import TestCase
from django.utils.unittest import skipIf
import reversion
 
import yawf

src/d/j/django-old-HEAD/django/test/utils.py   django-old(Download)
from django.template import Template
from django.utils.translation import deactivate
from django.utils.unittest import skipIf
 
class ContextList(list):
    settings_engine = settings.DATABASES[DEFAULT_DB_ALIAS]['ENGINE']
    if isinstance(engine, basestring):
        return skipIf(settings_engine == engine, reason)
    return skipIf(settings_engine in engine, reason)
 

src/d/j/django-endless-pagination-2.0/endless_pagination/tests/templatetags/test_endless.py   django-endless-pagination(Download)
 
skip_if_old_etree = unittest.skipIf(
    sys.version_info < (2, 7), 'XPath not supported by this Python version.')
 
 

src/d/j/django-endless-pagination-HEAD/endless_pagination/tests/templatetags/test_endless.py   django-endless-pagination(Download)
 
skip_if_old_etree = unittest.skipIf(
    sys.version_info < (2, 7), 'XPath not supported by this Python version.')
 
 

src/t/u/tubechaser-HEAD/website/TubeChaser/django/contrib/messages/tests/base.py   tubechaser(Download)
from django.conf import settings
from django.utils.translation import ugettext_lazy
from django.utils.unittest import skipIf
from django.contrib.messages import constants, utils, get_level, set_level
from django.contrib.messages.api import MessageFailure

src/t/r/triaquae-HEAD/TriAquae/models/django/test/testcases.py   triaquae(Download)
from django.utils import six
from django.utils.unittest.util import safe_repr
from django.utils.unittest import skipIf
from django.views.static import serve
 

src/t/r/triaquae-HEAD/TriAquae/models/django/contrib/messages/tests/base.py   triaquae(Download)
from django.test.utils import override_settings
from django.utils.translation import ugettext_lazy
from django.utils.unittest import skipIf
 
 

src/t/r/triaquae-HEAD/TriAquae/models/django/contrib/humanize/tests.py   triaquae(Download)
from django.utils.translation import ugettext as _
from django.utils import tzinfo
from django.utils.unittest import skipIf
 
 

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next