コード例 #1
0
 def loadTestsFromTestCase(self, testCaseClass):
     testModule = sys.modules[testCaseClass.__module__]
     if not(testCaseClass is ERP5TypeTestCase):
       # do not reload ERP5TypeTestCase because we patch it
       testModule = reload(testModule)
     testCaseClass = getattr(testModule, testCaseClass.__name__)
     return ERP5TypeTestLoader.loadTestsFromTestCase(self, testCaseClass)
コード例 #2
0
 def loadTestsFromTestCase(self, testCaseClass):
     testModule = sys.modules[testCaseClass.__module__]
     # Do not reload ERP5TypeTestCase because we patch it nor ZODB Test
     # Component as it is reset upon modification anyway
     if (testCaseClass is not ERP5TypeTestCase and
         not isinstance(testModule, ComponentDynamicPackage)):
       testModule = reload(testModule)
     testCaseClass = getattr(testModule, testCaseClass.__name__)
     return ERP5TypeTestLoader.loadTestsFromTestCase(self, testCaseClass)
コード例 #3
0
ファイル: ERP5TypeLiveTestCase.py プロジェクト: poses/erp5
 def loadTestsFromTestCase(self, testCaseClass):
     testModule = sys.modules[testCaseClass.__module__]
     # Do not reload ERP5TypeTestCase because we patch it nor ZODB Test
     # Component as it is reset upon modification anyway
     if (testCaseClass is not ERP5TypeTestCase and
         not isinstance(testModule, ComponentDynamicPackage)):
       testModule = reload(testModule)
     testCaseClass = getattr(testModule, testCaseClass.__name__)
     return ERP5TypeTestLoader.loadTestsFromTestCase(self, testCaseClass)
コード例 #4
0
 def loadTestsFromTestCase(self, testCaseClass):
     testModule = sys.modules[testCaseClass.__module__]
     # Do not reload ERP5TypeTestCase, SecurityTestCase or ERP5ReportTestCase because we patch
     # it nor ZODB Test Component as it is reset upon modification anyway
     if (testCaseClass
             not in (ERP5TypeTestCase, SecurityTestCase, ERP5ReportTestCase)
             and not isinstance(getattr(testModule, '__loader__', None),
                                ComponentDynamicPackage)):
         testModule = reload(testModule)
     testCaseClass = getattr(testModule, testCaseClass.__name__)
     return ERP5TypeTestLoader.loadTestsFromTestCase(self, testCaseClass)