# Path: airy/utils/unittest/loader.py
# def _CmpToKey(mycmp):
#         def __init__(self, obj):
#         def __lt__(self, other):
# def _make_failed_import_test(name, suiteClass):
# def _make_failed_load_tests(name, exception, suiteClass):
# def _make_failed_test(classname, methodname, exception, suiteClass):
#     def testFailure(self):
#     def loadTestsFromTestCase(self, testCaseClass):
#     def loadTestsFromModule(self, module, use_load_tests=True):
#     def loadTestsFromName(self, name, module=None):
#     def loadTestsFromNames(self, names, module=None):
#     def getTestCaseNames(self, testCaseClass):
#         def isTestMethod(attrname, testCaseClass=testCaseClass,
#                          prefix=self.testMethodPrefix):
#     def discover(self, start_dir, pattern='test*.py', top_level_dir=None):
#     def _get_name_from_path(self, path):
#     def _get_module_from_name(self, name):
#     def _match_path(self, path, full_path, pattern):
#     def _find_tests(self, start_dir, pattern):
# def _makeLoader(prefix, sortUsing, suiteClass=None):
# def getTestCaseNames(testCaseClass, prefix, sortUsing=cmp):
# def makeSuite(testCaseClass, prefix='test', sortUsing=cmp,
#               suiteClass=suite.TestSuite):
# def findTestCases(module, prefix='test', sortUsing=cmp,
#                   suiteClass=suite.TestSuite):
#     class K(object):
# class TestLoader(unittest.TestLoader):
# VALID_MODULE_NAME = re.compile(r'[_a-z]\w*\.py$', re.IGNORECASE)
# 
# Path: airy/utils/unittest/runner.py
#     def registerResult(_):
#     def __init__(self,stream):
#     def __getattr__(self, attr):
#     def writeln(self, arg=None):
#     def __init__(self, stream, descriptions, verbosity):
#     def getDescription(self, test):
#     def startTest(self, test):
#     def addSuccess(self, test):
#     def addError(self, test, err):
#     def addFailure(self, test, err):
#     def addSkip(self, test, reason):
#     def addExpectedFailure(self, test, err):
#     def addUnexpectedSuccess(self, test):
#     def printErrors(self):
#     def printErrorList(self, flavour, errors):
#     def stopTestRun(self):
#     def __init__(self, stream=sys.stderr, descriptions=True, verbosity=1,
#                     failfast=False, buffer=False, resultclass=None):
#     def _makeResult(self):
#     def run(self, test):
# class _WritelnDecorator(object):
# class TextTestResult(result.TestResult):
# class TextTestRunner(unittest.TextTestRunner):


import sys
import os
import types
        import getopt
        import optparse
from airy.utils.unittest import loader, runner
    from airy.utils.unittest.signals import installHandler
                          help="Directory to start discovery ('.' default)")
        parser.add_option('-p', '--pattern', dest='pattern', default='test*.py',
                          help="Pattern to match tests ('test*.py' default)")
        parser.add_option('-t', '--top-level-directory', dest='top', default=None,
                          help='Top level directory of project (defaults to start directory)')

        options, args = parser.parse_args(argv)
        if len(args) > 3:
            self.usageExit()

        for name, value in zip(('start', 'pattern', 'top'), args):
            setattr(options, name, value)

        # only set options from the parsing here
        # if they weren't set explicitly in the constructor
        if self.failfast is None:
            self.failfast = options.failfast
        if self.catchbreak is None and installHandler is not None:
            self.catchbreak = options.catchbreak
        if self.buffer is None:
            self.buffer = options.buffer

        if options.verbose:
            self.verbosity = 2

        start_dir = options.start
        pattern = options.pattern
        top_level_dir = options.top

        loader = Loader()

# Path: airy/utils/unittest/loader.py
# def _CmpToKey(mycmp):
#         def __init__(self, obj):
#         def __lt__(self, other):
# def _make_failed_import_test(name, suiteClass):
# def _make_failed_load_tests(name, exception, suiteClass):
# def _make_failed_test(classname, methodname, exception, suiteClass):
#     def testFailure(self):
#     def loadTestsFromTestCase(self, testCaseClass):
#     def loadTestsFromModule(self, module, use_load_tests=True):
#     def loadTestsFromName(self, name, module=None):
#     def loadTestsFromNames(self, names, module=None):
#     def getTestCaseNames(self, testCaseClass):
#         def isTestMethod(attrname, testCaseClass=testCaseClass,
#                          prefix=self.testMethodPrefix):
#     def discover(self, start_dir, pattern='test*.py', top_level_dir=None):
#     def _get_name_from_path(self, path):
#     def _get_module_from_name(self, name):
#     def _match_path(self, path, full_path, pattern):
#     def _find_tests(self, start_dir, pattern):
# def _makeLoader(prefix, sortUsing, suiteClass=None):
# def getTestCaseNames(testCaseClass, prefix, sortUsing=cmp):
# def makeSuite(testCaseClass, prefix='test', sortUsing=cmp,
#               suiteClass=suite.TestSuite):
# def findTestCases(module, prefix='test', sortUsing=cmp,
#                   suiteClass=suite.TestSuite):
#     class K(object):
# class TestLoader(unittest.TestLoader):
# VALID_MODULE_NAME = re.compile(r'[_a-z]\w*\.py$', re.IGNORECASE)
# 
# Path: airy/utils/unittest/runner.py
#     def registerResult(_):
#     def __init__(self,stream):
#     def __getattr__(self, attr):
#     def writeln(self, arg=None):
#     def __init__(self, stream, descriptions, verbosity):
#     def getDescription(self, test):
#     def startTest(self, test):
#     def addSuccess(self, test):
#     def addError(self, test, err):
#     def addFailure(self, test, err):
#     def addSkip(self, test, reason):
#     def addExpectedFailure(self, test, err):
#     def addUnexpectedSuccess(self, test):
#     def printErrors(self):
#     def printErrorList(self, flavour, errors):
#     def stopTestRun(self):
#     def __init__(self, stream=sys.stderr, descriptions=True, verbosity=1,
#                     failfast=False, buffer=False, resultclass=None):
#     def _makeResult(self):
#     def run(self, test):
# class _WritelnDecorator(object):
# class TextTestResult(result.TestResult):
# class TextTestRunner(unittest.TextTestRunner):


# Path: airy/utils/unittest/main.py
import sys
import os
import types
        import getopt
        import optparse
from airy.utils.unittest import loader, runner
    from airy.utils.unittest.signals import installHandler

                          help="Directory to start discovery ('.' default)")
        parser.add_option('-p', '--pattern', dest='pattern', default='test*.py',
                          help="Pattern to match tests ('test*.py' default)")
        parser.add_option('-t', '--top-level-directory', dest='top', default=None,
                          help='Top level directory of project (defaults to start directory)')

        options, args = parser.parse_args(argv)
        if len(args) > 3:
            self.usageExit()

        for name, value in zip(('start', 'pattern', 'top'), args):
            setattr(options, name, value)

        # only set options from the parsing here
        # if they weren't set explicitly in the constructor
        if self.failfast is None:
            self.failfast = options.failfast
        if self.catchbreak is None and installHandler is not None:
            self.catchbreak = options.catchbreak
        if self.buffer is None:
            self.buffer = options.buffer

        if options.verbose:
            self.verbosity = 2

        start_dir = options.start
        pattern = options.pattern
        top_level_dir = options.top

        loader = Loader()

        self.test = loader.discover(start_dir, pattern, top_level_dir)