Commit 09a690cd authored by Sebastien Robin's avatar Sebastien Robin

sometimes reload of testClass was disabling live test patch of

ERP5TypeTestCase

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45107 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 87de9a5d
......@@ -160,7 +160,10 @@ class ERP5TypeTestReLoader(ERP5TypeTestLoader):
return super(ERP5TypeTestReLoader, self).loadTestsFromModule(module)
def loadTestsFromTestCase(self, testCaseClass):
testModule = reload(sys.modules[testCaseClass.__module__])
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 super(ERP5TypeTestReLoader,
self).loadTestsFromTestCase(testCaseClass)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment