Commit d3f507a9 authored by Łukasz Nowak's avatar Łukasz Nowak

- docstrings update, formatting

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27480 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1ef807c2
......@@ -51,9 +51,10 @@ implements_tuple_list = [
]
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,12 +68,15 @@ def makeTestMethod(document, interface):
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()
def test_suite():
......
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