Commit 847cb0ab authored by Jérome Perrin's avatar Jérome Perrin

ClassTool: do not suggest to number tests

Test should be independant and run in any order, so do not suggest a way to
force the order of tests.
parent b0a56cef
...@@ -785,36 +785,30 @@ def myExtensionMethod(self, param=None): ...@@ -785,36 +785,30 @@ def myExtensionMethod(self, param=None):
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
class Test(ERP5TypeTestCase): class Test(ERP5TypeTestCase):
""" """A Sample Test Class
A Sample Test Class
""" """
def getTitle(self): def getTitle(self):
return "SampleTest" return "SampleTest"
def getBusinessTemplateList(self): def getBusinessTemplateList(self):
""" """Tuple of Business Templates we need to install
Tuple of Business Templates we need to install
""" """
return ('erp5_base',) return ('erp5_base',)
def afterSetUp(self): def afterSetUp(self):
""" """This is ran before anything, used to set the environment
This is ran before anything, used to set the environment
""" """
# here, you can create the categories and objects your test will depend on # here, you can create the categories and objects your test will depend on
pass pass
def test_01_sampleTest(self): def test_sampleTest(self):
""" """A Sample Test
A Sample Test
For the method to be called during the test, For the method to be called during the test,
its name must start with 'test'. its name must start with 'test'.
The '_01_' part of the name is not mandatory,
it just allows you to define in which order the tests are to be launched.
Tests methods (self.assert... and self.failIf...) Tests methods (self.assert... and self.failIf...)
are defined in /usr/lib/python/unittest.py. are defined in http://docs.python.org/2/library/unittest.html
""" """
self.assertEqual(0, 1) self.assertEqual(0, 1)
''' % COPYRIGHT ''' % COPYRIGHT
......
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