[Erp5-report] r45107 seb - /erp5/trunk/products/ERP5Type/tests/ERP5TypeLiveTestCase.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Apr 5 19:17:10 CEST 2011


Author: seb
Date: Tue Apr  5 19:17:10 2011
New Revision: 45107

URL: http://svn.erp5.org?rev=45107&view=rev
Log:
sometimes reload of testClass was disabling live test patch of
ERP5TypeTestCase

Modified:
    erp5/trunk/products/ERP5Type/tests/ERP5TypeLiveTestCase.py

Modified: erp5/trunk/products/ERP5Type/tests/ERP5TypeLiveTestCase.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/tests/ERP5TypeLiveTestCase.py?rev=45107&r1=45106&r2=45107&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/tests/ERP5TypeLiveTestCase.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/tests/ERP5TypeLiveTestCase.py [utf8] Tue Apr  5 19:17:10 2011
@@ -160,7 +160,10 @@ class ERP5TypeTestReLoader(ERP5TypeTestL
         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)



More information about the Erp5-report mailing list