Commit e4ebb4f0 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

* override tearDown() so that it does not execute beforeTearDown and

  afterTearDown from the original tests, which would write to the
  FileStorage when --save is enabled.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13097 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dba9095b
...@@ -658,6 +658,14 @@ def dummy_setUp(self): ...@@ -658,6 +658,14 @@ def dummy_setUp(self):
self._clear() self._clear()
raise raise
def dummy_tearDown(self):
'''
This one is overloaded so that it dos not execute beforeTearDown and
afterTearDown from the original tests, which would write to the
FileStorage when --save is enabled
'''
pass
def optimize(): def optimize():
'''Significantly reduces portal creation time.''' '''Significantly reduces portal creation time.'''
def __init__(self, text): def __init__(self, text):
......
...@@ -11,11 +11,11 @@ Options: ...@@ -11,11 +11,11 @@ Options:
-v, --verbose produce verbose output -v, --verbose produce verbose output
-h, --help this help screen -h, --help this help screen
-p, --profile print profiling results at the end -p, --profile print profiling results at the end
--portal_id=STRING force id of the portal. Usefull when using --portal_id=STRING force id of the portal. Useful when using
--data_fs_path to run tests on an existing --data_fs_path to run tests on an existing
Data.fs Data.fs
--data_fs_path=STRING Path to the orginal Data.fs to run tests on an --data_fs_path=STRING Path to the original Data.fs to run tests on an
existing environment. The Data.fs is openned read existing environment. The Data.fs is opened read
only only
--recreate_catalog=0 or 1 recreate the content of the sql catalog. Defaults --recreate_catalog=0 or 1 recreate the content of the sql catalog. Defaults
is to recreate, when using an existing Data.fs is to recreate, when using an existing Data.fs
...@@ -35,7 +35,7 @@ Options: ...@@ -35,7 +35,7 @@ Options:
erp5_sql_deferred_connection (if unset, defaults erp5_sql_deferred_connection (if unset, defaults
to erp5_sql_connection_string) to erp5_sql_connection_string)
--email_from_address=STRING --email_from_address=STRING
Initialize the email_from_address property of the Initialise the email_from_address property of the
portal, by defaults, CMFActivity failures are sent portal, by defaults, CMFActivity failures are sent
on localhost from this address, to this address on localhost from this address, to this address
--erp5_catalog_storage=STRING --erp5_catalog_storage=STRING
...@@ -172,10 +172,11 @@ def runUnitTestList(test_list) : ...@@ -172,10 +172,11 @@ def runUnitTestList(test_list) :
# and PortalTestCase.setUp to skip beforeSetUp and afterSetUp # and PortalTestCase.setUp to skip beforeSetUp and afterSetUp
if os.environ.get('erp5_save_data_fs'): if os.environ.get('erp5_save_data_fs'):
from Products.ERP5Type.tests.ERP5TypeTestCase import \ from Products.ERP5Type.tests.ERP5TypeTestCase import \
dummy_makeSuite, dummy_setUp dummy_makeSuite, dummy_setUp, dummy_tearDown
from Testing.ZopeTestCase.PortalTestCase import PortalTestCase from Testing.ZopeTestCase.PortalTestCase import PortalTestCase
unittest.makeSuite = dummy_makeSuite unittest.makeSuite = dummy_makeSuite
PortalTestCase.setUp = dummy_setUp PortalTestCase.setUp = dummy_setUp
PortalTestCase.tearDown = dummy_tearDown
filtered_tests_class_names = 0 filtered_tests_class_names = 0
for test in test_list: for test in test_list:
......
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