コード例 #1
0
 def __init__(self):
     """Initialize a test loader.
     """
     self.config = Config()
     self.selector = defaultSelector(self.config)
     self.workingDir = op_normpath(op_abspath(self.config.workingDir))
     self.suiteClass = ContextSuiteFactory(config=self.config)
     unittest.TestLoader.__init__(self)
コード例 #2
0
 def __init__(self, config=None):
     if config is None:
         config = Config()
     self.config = config
     self.suites = {}
     self.context = {}
     self.was_setup = {}
     self.was_torndown = {}
コード例 #3
0
 def __init__(self, test, config=None):
     if not hasattr(test, '__call__'):
         raise TypeError("Test called with argument %r that "
                         "is not callable. A callable is required." % test)
     self.test = test
     if config is None:
         config = Config()
     self.config = config
     unittest.TestCase.__init__(self)
コード例 #4
0
    def __init__(self, tests=(), context=None, factory=None, config=None):

        self.context = context
        self.factory = factory
        if config is None:
            config = Config()
        self.config = config
        self.has_run = False
        self.error_context = None
        LazySuite.__init__(self, tests)
コード例 #5
0
 def __init__(self, config):
     if config is None:
         config = Config()
     self.configure(config)