• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(389)  |  Call(377)  |  Derive(5)  |  Import(7)
Raise this exception in a test to skip it.

Usually you can use TestResult.skip() or one of the skipping decorators
instead of raising this directly.

src/m/o/mocktest-HEAD/test/mocktest_test.py   mocktest(Download)
	def test_pending_should_raise_skipTest(self):
		@pending
		def test_failed_pending(self):
			assert False
 
		try:
			from unittest import SkipTest

src/m/o/mocktest-HEAD/mocktest/mocktest.py   mocktest(Download)
 
# set the SkipTest exception class
try:
	from unittest import SkipTest
except ImportError:
	SkipTest = None
 

src/s/e/setproctitle-HEAD/tests/setproctitle_test.py   setproctitle(Download)
    from nose.plugins.skip import SkipTest
except ImportError:
    try:
        from unittest import SkipTest
    except ImportError:
        class SkipTest(Exception):
            pass

src/d/u/dulwich-HEAD/dulwich/tests/__init__.py   dulwich(Download)
 
try:
    # If Python itself provides an exception, use that
    from unittest import SkipTest as TestSkipped
except ImportError:
    # Check if the nose exception can be used
    try:

src/s/e/setproctitle-1.1/tests/setproctitle_test.py   setproctitle(Download)
    from nose.plugins.skip import SkipTest
except ImportError:
    try:
        from unittest import SkipTest
    except ImportError:
        class SkipTest(Exception):
            pass

src/m/o/mocktest-0.3.1/mocktest/mocktest.py   mocktest(Download)
 
# set the SkipTest exception class
try:
	from unittest import SkipTest
except ImportError:
	SkipTest = None
 

src/l/o/logilab-common-0.52.0/testlib.py   logilab-common(Download)
    from unittest2 import SkipTest
else:
    import unittest
    from unittest import SkipTest
 
try:
    from functools import wraps
class InnerTestSkipped(SkipTest):
    """raised when a test is skipped"""
    pass
 
def is_generator(function):
    flags = function.func_code.co_flags
    return flags & CO_GENERATOR