Commit 976c858d authored by Jérome Perrin's avatar Jérome Perrin

Clean modules in tear down, not in next test, otherwise it will fail if you...

Clean modules in tear down, not in next test, otherwise it will fail if you only run this next test.
Note pystones on test machine, can be usefull someday for comparision



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17117 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b59aa6d6
......@@ -36,6 +36,7 @@ from Products.CMFCore.tests.base.testcase import LogInterceptor
# Define variable to chek if performance are good or not
# XXX These variable are specific to the testing environment
# (which has 31645.6 pystones/second)
MIN_OBJECT_VIEW=0.112
MAX_OBJECT_VIEW=0.122
MIN_MODULE_VIEW=0.125
......@@ -76,6 +77,12 @@ class TestPerformance(ERP5TypeTestCase, LogInterceptor):
self.login()
self.bar_module = self.getBarModule()
def beforeTearDown(self):
get_transaction().abort()
self.bar_module.manage_delObjects(list(self.bar_module.objectIds()))
get_transaction().commit()
self.tic()
def test_00_viewBarObject(self, quiet=quiet, run=run_all_test):
"""
Estimate average time to render object view
......@@ -115,8 +122,6 @@ class TestPerformance(ERP5TypeTestCase, LogInterceptor):
if not quiet:
message = 'Test form to view Bar module'
LOG('Testing... ', 0, message)
# remove previous object
self.bar_module.manage_delObjects(['bar'])
get_transaction().commit()
self.tic()
view_result = {}
......
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