[Erp5-report] r27480 - /erp5/trunk/products/ERP5/tests/testERP5Interfaces.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Jun 9 17:34:22 CEST 2009
Author: luke
Date: Tue Jun 9 17:34:21 2009
New Revision: 27480
URL: http://svn.erp5.org?rev=27480&view=rev
Log:
- docstrings update, formatting
Modified:
erp5/trunk/products/ERP5/tests/testERP5Interfaces.py
Modified: erp5/trunk/products/ERP5/tests/testERP5Interfaces.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testERP5Interfaces.py?rev=27480&r1=27479&r2=27480&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testERP5Interfaces.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testERP5Interfaces.py [utf8] Tue Jun 9 17:34:21 2009
@@ -51,9 +51,10 @@
]
class TestERP5Interfaces(ERP5TypeTestCase):
- """Test that every class implements interfaces properly"""
+ """Tests implementation of interfaces"""
def makeTestMethod(document, interface):
+ """Common method which checks if documents implements interface"""
def testMethod(self):
_temp = __import__('Products.ERP5Type.Document.%s' % document, globals(),
locals(), ['%s' % document])
@@ -67,11 +68,14 @@
return testMethod
def addTestMethodDynamically():
+ """Creates test methods on the fly
+
+ Uses naming test_TradeCondition_implements_ITransformation
+ It is possible to use --run_only on those dynamically generated methods"""
for document, interface in implements_tuple_list:
method_name = 'test_%s_implements_%s' % (document, interface)
method = makeTestMethod(document, interface)
setattr(TestERP5Interfaces, method_name, method)
-
addTestMethodDynamically()
More information about the Erp5-report
mailing list