예제 #1
0
 def setUp(self):
     """Run any setup function attached to the test function
     """
     if self.setUpFunc:
         self.setUpFunc()
     else:
         names = ("setup", "setUp", "setUpFunc")
         try_run(self.test, names)
예제 #2
0
 def tearDown(self):
     """Run any teardown function attached to the test function
     """
     if self.tearDownFunc:
         self.tearDownFunc()
     else:
         names = ("teardown", "tearDown", "tearDownFunc")
         try_run(self.test, names)
예제 #3
0
 def teardownContext(self, context):
     if self.factory:
         if context in self.factory.was_torndown:
             return
         self.factory.was_torndown[context] = self
     if isclass(context):
         names = self.classTeardown
     else:
         names = self.moduleTeardown
         if hasattr(context, '__path__'):
             names = self.packageTeardown + names
     try_run(context, names)
예제 #4
0
 def setupContext(self, context):
     if self.factory:
         if context in self.factory.was_setup:
             return
         self.factory.was_setup[context] = self
     if isclass(context):
         names = self.classSetup
     else:
         names = self.moduleSetup
         if hasattr(context, '__path__'):
             names = self.packageSetup + names
     try_run(context, names)
예제 #5
0
 def tearDown(self):
     try_run(self.inst, ("teardown", "tearDown"))
예제 #6
0
 def setUp(self):
     try_run(self.inst, ("setup", "setUp"))
예제 #7
0
 def tearDown(self):
     try_run(self.inst, ('teardown', 'tearDown'))
예제 #8
0
 def setUp(self):
     try_run(self.inst, ('setup', 'setUp'))
예제 #9
0
 def setUp(self):
     try_run(self.inst, ('setup', 'setUp'))