""" This plugin installs a SKIP error class for the SkipTest exception. When SkipTest is raised, the exception will be logged in the skipped attribute of the result, 'S' or 'SKIP' (verbose) will be output, and the exception will not be counted as an error or failure. This plugin is enabled by default but may be disabled with the ``--no-skip`` option. """
# on SkipTest: # - unittest SkipTest is first preference, but it's only available # for >= 2.7 # - unittest2 SkipTest is second preference for older pythons. This # mirrors logic for choosing SkipTest exception in testtools # - if none of the above, provide custom class except ImportError: try: from unittest2.case import SkipTest except ImportError: class SkipTest(Exception): """Raise this exception to mark a test as skipped. """ pass
""" Plugin that installs a SKIP error class for the SkipTest exception. When SkipTest is raised, the exception will be logged in the skipped attribute of the result, 'S' or 'SKIP' (verbose) will be output, and the exception will not be counted as an error or failure. """ label='SKIP', isfailure=False)
""" Add my options to command line. """ dest='noSkip', default=env.get(env_opt, False), help="Disable special handling of SkipTest " "exceptions.")
""" Configure plugin. Skip plugin is enabled by default. """ return self.enabled = False
|