Did I find the right examples for you? yes no

All Samples(235)  |  Call(117)  |  Derive(0)  |  Import(118)
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/a/m/amcat-HEAD/amcat/tools/amcates.py   amcat(Download)
 
from amcat.tools import amcattest
from unittest import skipUnless, skip
 
class TestAmcatES(amcattest.AmCATTestCase):

src/c/l/cloudroast-HEAD/cloudroast/objectstorage/regression/middleware/temp_url.py   cloudroast(Download)
import time
 
from unittest import skipUnless
from cafe.engine.clients.rest import BaseRestClient
from cloudroast.objectstorage.fixtures import ObjectStorageFixture

src/p/y/pytaint-HEAD/Python-2.7.5-pytaint/Lib/test/test_support.py   pytaint(Download)
                   sysconfig.get_config_var('WITH_DOC_STRINGS'))
 
requires_docstrings = unittest.skipUnless(HAVE_DOCSTRINGS,
                                          "test requires docstrings")
 

src/p/y/Py2crazy-HEAD/Python-2.7.5/Lib/test/test_support.py   Py2crazy(Download)
                   sysconfig.get_config_var('WITH_DOC_STRINGS'))
 
requires_docstrings = unittest.skipUnless(HAVE_DOCSTRINGS,
                                          "test requires docstrings")
 

src/m/a/main-HEAD/External.LCA_RESTRICTED/Languages/IronPython/27/Lib/test/test_float.py   main(Download)
 
have_getformat = hasattr(float, "__getformat__")
requires_getformat = unittest.skipUnless(have_getformat,
                                         "requires __getformat__")
requires_setformat = unittest.skipUnless(hasattr(float, "__setformat__"),
                                         "requires __setformat__")
# decorator for skipping tests on non-IEEE 754 platforms
requires_IEEE_754 = unittest.skipUnless(have_getformat and

src/m/a/main-HEAD/External.LCA_RESTRICTED/Languages/CPython/27/Lib/test/test_float.py   main(Download)
 
have_getformat = hasattr(float, "__getformat__")
requires_getformat = unittest.skipUnless(have_getformat,
                                         "requires __getformat__")
requires_setformat = unittest.skipUnless(hasattr(float, "__setformat__"),
                                         "requires __setformat__")
# decorator for skipping tests on non-IEEE 754 platforms
requires_IEEE_754 = unittest.skipUnless(have_getformat and

src/i/r/ironpython3-HEAD/Src/StdLib/Lib/test/test_zlib.py   ironpython3(Download)
 
requires_Compress_copy = unittest.skipUnless(
        hasattr(zlib.compressobj(), "copy"),
        'requires Compress.copy()')
requires_Decompress_copy = unittest.skipUnless(
        hasattr(zlib.decompressobj(), "copy"),

src/p/y/pytaint-HEAD/Python-2.7.5-pytaint/Lib/test/test_float.py   pytaint(Download)
 
have_getformat = hasattr(float, "__getformat__")
requires_getformat = unittest.skipUnless(have_getformat,
                                         "requires __getformat__")
requires_setformat = unittest.skipUnless(hasattr(float, "__setformat__"),
                                         "requires __setformat__")
# decorator for skipping tests on non-IEEE 754 platforms
requires_IEEE_754 = unittest.skipUnless(have_getformat and

src/p/y/Py2crazy-HEAD/Python-2.7.5/Lib/test/test_float.py   Py2crazy(Download)
 
have_getformat = hasattr(float, "__getformat__")
requires_getformat = unittest.skipUnless(have_getformat,
                                         "requires __getformat__")
requires_setformat = unittest.skipUnless(hasattr(float, "__setformat__"),
                                         "requires __setformat__")
# decorator for skipping tests on non-IEEE 754 platforms
requires_IEEE_754 = unittest.skipUnless(have_getformat and

src/i/r/ironpython3-HEAD/Src/StdLib/Lib/test/test_sax.py   ironpython3(Download)
        supports_nonascii_filenames = False
requires_nonascii_filenames = unittest.skipUnless(
        supports_nonascii_filenames,
        'Requires non-ascii filenames support')
 

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