Did I find the right examples for you? yes no

All Samples(365)  |  Call(46)  |  Derive(0)  |  Import(319)
Skip a test unless the condition is true.

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


src/h/u/hunch-sample-app-HEAD/django/contrib/sitemaps/tests/basic.py   hunch-sample-app(Download)
from django.core.exceptions import ImproperlyConfigured
from django.test import TestCase
from django.utils.unittest import skipUnless
from django.utils.formats import localize
from django.utils.translation import activate, deactivate

src/a/p/appscale-HEAD/AppServer/lib/django-1.5/tests/regressiontests/generic_views/dates.py   appscale(Download)
from django.test.utils import override_settings
from django.utils import timezone
from django.utils.unittest import skipUnless
 
from .models import Book, BookSigning
# or attempt to interpret naive datetimes in the default timezone.
 
requires_tz_support = skipUnless(TZ_SUPPORT,
        "This test relies on the ability to run a program in an arbitrary "
        "time zone, but your operating system isn't able to do that.")

src/a/p/appscale-HEAD/AppServer/lib/django-1.5/tests/modeltests/timezones/tests.py   appscale(Download)
from django.utils import timezone
from django.utils.tzinfo import FixedOffset
from django.utils.unittest import skipIf, skipUnless
 
from .forms import EventForm, EventSplitForm, EventModelForm
# or attempt to interpret naive datetimes in the default timezone.
 
requires_tz_support = skipUnless(TZ_SUPPORT,
        "This test relies on the ability to run a program in an arbitrary "
        "time zone, but your operating system isn't able to do that.")

src/a/p/appscale-HEAD/AppServer/lib/django-1.4/tests/modeltests/timezones/tests.py   appscale(Download)
from django.utils import timezone
from django.utils.tzinfo import FixedOffset
from django.utils.unittest import skipIf, skipUnless
 
from .forms import EventForm, EventSplitForm, EventModelForm
# or attempt to interpret naive datetimes in the default timezone.
 
requires_tz_support = skipUnless(TZ_SUPPORT,
        "This test relies on the ability to run a program in an arbitrary "
        "time zone, but your operating system isn't able to do that.")

src/g/o/google-app-engine-HEAD/lib/django-1.5/tests/regressiontests/generic_views/dates.py   google-app-engine(Download)
from django.test.utils import override_settings
from django.utils import timezone
from django.utils.unittest import skipUnless
 
from .models import Book, BookSigning
# or attempt to interpret naive datetimes in the default timezone.
 
requires_tz_support = skipUnless(TZ_SUPPORT,
        "This test relies on the ability to run a program in an arbitrary "
        "time zone, but your operating system isn't able to do that.")

src/g/o/google-app-engine-HEAD/lib/django-1.5/tests/modeltests/timezones/tests.py   google-app-engine(Download)
from django.utils import timezone
from django.utils.tzinfo import FixedOffset
from django.utils.unittest import skipIf, skipUnless
 
from .forms import EventForm, EventSplitForm, EventModelForm
# or attempt to interpret naive datetimes in the default timezone.
 
requires_tz_support = skipUnless(TZ_SUPPORT,
        "This test relies on the ability to run a program in an arbitrary "
        "time zone, but your operating system isn't able to do that.")

src/g/o/google-app-engine-HEAD/lib/django-1.4/tests/modeltests/timezones/tests.py   google-app-engine(Download)
from django.utils import timezone
from django.utils.tzinfo import FixedOffset
from django.utils.unittest import skipIf, skipUnless
 
from .forms import EventForm, EventSplitForm, EventModelForm
# or attempt to interpret naive datetimes in the default timezone.
 
requires_tz_support = skipUnless(TZ_SUPPORT,
        "This test relies on the ability to run a program in an arbitrary "
        "time zone, but your operating system isn't able to do that.")

src/h/u/hue-HEAD/desktop/core/ext-py/Django-1.4.5/tests/modeltests/timezones/tests.py   hue(Download)
from django.utils import timezone
from django.utils.tzinfo import FixedOffset
from django.utils.unittest import skipIf, skipUnless
 
from .forms import EventForm, EventSplitForm, EventModelForm
# or attempt to interpret naive datetimes in the default timezone.
 
requires_tz_support = skipUnless(TZ_SUPPORT,
        "This test relies on the ability to run a program in an arbitrary "
        "time zone, but your operating system isn't able to do that.")

src/u/p/UP-Manager-0.0.0/tests/generic_views/test_dates.py   UP-Manager(Download)
from django.test.utils import override_settings
from django.utils import timezone
from django.utils.unittest import skipUnless
 
from .models import Book, BookSigning
# or attempt to interpret naive datetimes in the default timezone.
 
requires_tz_support = skipUnless(TZ_SUPPORT,
        "This test relies on the ability to run a program in an arbitrary "
        "time zone, but your operating system isn't able to do that.")

src/g/o/googleappengine-python-HEAD/lib/django-1.4/tests/modeltests/timezones/tests.py   googleappengine-python(Download)
from django.utils import timezone
from django.utils.tzinfo import FixedOffset
from django.utils.unittest import skipIf, skipUnless
 
from .forms import EventForm, EventSplitForm, EventModelForm
# or attempt to interpret naive datetimes in the default timezone.
 
requires_tz_support = skipUnless(TZ_SUPPORT,
        "This test relies on the ability to run a program in an arbitrary "
        "time zone, but your operating system isn't able to do that.")

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