Did I find the right examples for you? yes no

All Samples(177)  |  Call(50)  |  Derive(0)  |  Import(127)
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/a/p/apgl-0.8.0/apgl/__init__.py   apgl(Download)
    if version >= 2.7:
        import unittest
        return unittest.skipIf(condition, reason)
    else:
        import unittest2

src/a/p/APGL-HEAD/apgl/__init__.py   APGL(Download)
    if version >= 2.7:
        import unittest
        return unittest.skipIf(condition, reason)
    else:
        import unittest2

src/b/l/blz-0.6.2/blz/py2help.py   blz(Download)
if sys.version_info[:2] >= (2, 7):
    from ctypes import c_ssize_t
    from unittest import skip, skipIf
else:
    import ctypes

src/b/l/blaze-0.1/blaze/py3help.py   blaze(Download)
if sys.version_info[:2] >= (2, 7):
    from ctypes import c_ssize_t
    from unittest import skip, skipIf
else:
    import ctypes

src/b/l/blaze-HEAD/blaze/py2help.py   blaze(Download)
if sys.version_info[:2] >= (2, 7):
    from ctypes import c_ssize_t
    from unittest import skip, skipIf
else:
    import ctypes

src/d/a/datashape-HEAD/datashape/py2help.py   datashape(Download)
 
if sys.version_info[:2] >= (2, 7):
    from unittest import skip, skipIf
else:
    from nose.plugins.skip import SkipTest

src/d/j/django_seleniumhelpers-1.1.1/seleniumhelpers/seleniumhelpers.py   django_seleniumhelpers(Download)
from unittest import skipIf
import os
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.support.ui import WebDriverWait

src/i/r/ironpython3-HEAD/Src/StdLib/Lib/test/test_pathlib.py   ironpython3(Download)
symlink_skip_reason = symlink_skip_reason()
 
only_nt = unittest.skipIf(os.name != 'nt',
                          'test requires a Windows-compatible system')
only_posix = unittest.skipIf(os.name == 'nt',
                             'test requires a POSIX-compatible system')
with_symlinks = unittest.skipIf(symlink_skip_reason, symlink_skip_reason)

src/c/p/cpython-HEAD/Lib/test/test_pathlib.py   cpython(Download)
symlink_skip_reason = symlink_skip_reason()
 
only_nt = unittest.skipIf(os.name != 'nt',
                          'test requires a Windows-compatible system')
only_posix = unittest.skipIf(os.name == 'nt',
                             'test requires a POSIX-compatible system')
with_symlinks = unittest.skipIf(symlink_skip_reason, symlink_skip_reason)

src/b/o/bokeh-0.4.4/bokeh/tests/test_utils.py   bokeh(Download)
import unittest
from unittest import skipIf
 
from ..utils import is_py3, is_pypy
 
 
def skipIfPy3(message):
    return skipIf(is_py3(), message)
def skipIfPyPy(message):
    return skipIf(is_pypy(), message)
 
 
class DummyRequestCallable():

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