Commit 8c6c7391 authored by Jérome Perrin's avatar Jérome Perrin

run tests quietly



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9358 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3a2f26d1
...@@ -41,6 +41,8 @@ from Products.ERP5Type.tests.Sequence import Sequence, SequenceList ...@@ -41,6 +41,8 @@ from Products.ERP5Type.tests.Sequence import Sequence, SequenceList
class TestConstraint(ERP5TypeTestCase): class TestConstraint(ERP5TypeTestCase):
run_all_test = 1 run_all_test = 1
quiet = 1
object_portal_type = "Organisation" object_portal_type = "Organisation"
object_title = "Title test" object_title = "Title test"
...@@ -292,7 +294,7 @@ class TestConstraint(ERP5TypeTestCase): ...@@ -292,7 +294,7 @@ class TestConstraint(ERP5TypeTestCase):
id='default_constraint', id='default_constraint',
description='constraint test') description='constraint test')
def test_01_Constraint(self, quiet=0, run=run_all_test): def test_01_Constraint(self, quiet=quiet, run=run_all_test):
""" """
Test default Constraint class Test default Constraint class
""" """
...@@ -306,7 +308,7 @@ class TestConstraint(ERP5TypeTestCase): ...@@ -306,7 +308,7 @@ class TestConstraint(ERP5TypeTestCase):
CheckIfConstraintSucceeded \ CheckIfConstraintSucceeded \
' '
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self, quiet=quiet)
def stepCreatePropertyExistence0(self, sequence=None, def stepCreatePropertyExistence0(self, sequence=None,
sequence_list=None, **kw): sequence_list=None, **kw):
...@@ -340,7 +342,7 @@ class TestConstraint(ERP5TypeTestCase): ...@@ -340,7 +342,7 @@ class TestConstraint(ERP5TypeTestCase):
description='propertyExistence test', description='propertyExistence test',
title=None) title=None)
def test_02_PropertyExistence(self, quiet=0, run=run_all_test): def test_02_PropertyExistence(self, quiet=quiet, run=run_all_test):
""" """
Test property existence Test property existence
""" """
...@@ -393,7 +395,7 @@ class TestConstraint(ERP5TypeTestCase): ...@@ -393,7 +395,7 @@ class TestConstraint(ERP5TypeTestCase):
CheckIfConstraintSucceeded \ CheckIfConstraintSucceeded \
' '
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self, quiet=quiet)
def stepCreatePropertyTypeValidity(self, sequence=None, def stepCreatePropertyTypeValidity(self, sequence=None,
sequence_list=None, **kw): sequence_list=None, **kw):
...@@ -405,7 +407,7 @@ class TestConstraint(ERP5TypeTestCase): ...@@ -405,7 +407,7 @@ class TestConstraint(ERP5TypeTestCase):
id='property_type_validity', id='property_type_validity',
description='propertyTypeValidity test') description='propertyTypeValidity test')
def test_03_PropertyTypeValidity(self, quiet=0, run=run_all_test): def test_03_PropertyTypeValidity(self, quiet=quiet, run=run_all_test):
""" """
Test property type validity Test property type validity
""" """
...@@ -494,7 +496,7 @@ class TestConstraint(ERP5TypeTestCase): ...@@ -494,7 +496,7 @@ class TestConstraint(ERP5TypeTestCase):
CheckIfConstraintSucceeded \ CheckIfConstraintSucceeded \
' '
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self, quiet=quiet)
def stepCreateAttributeEquality0(self, sequence=None, def stepCreateAttributeEquality0(self, sequence=None,
sequence_list=None, **kw): sequence_list=None, **kw):
...@@ -517,7 +519,7 @@ class TestConstraint(ERP5TypeTestCase): ...@@ -517,7 +519,7 @@ class TestConstraint(ERP5TypeTestCase):
description='AttributeEquality test', description='AttributeEquality test',
title=self.object_title) title=self.object_title)
def test_04_AttributeEquality(self, quiet=0, run=run_all_test): def test_04_AttributeEquality(self, quiet=quiet, run=run_all_test):
""" """
Test attribute equality Test attribute equality
""" """
...@@ -560,7 +562,7 @@ class TestConstraint(ERP5TypeTestCase): ...@@ -560,7 +562,7 @@ class TestConstraint(ERP5TypeTestCase):
CheckIfConstraintSucceeded \ CheckIfConstraintSucceeded \
' '
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self, quiet=quiet)
def stepCreateCategoryExistence0(self, sequence=None, def stepCreateCategoryExistence0(self, sequence=None,
sequence_list=None, **kw): sequence_list=None, **kw):
...@@ -606,7 +608,7 @@ class TestConstraint(ERP5TypeTestCase): ...@@ -606,7 +608,7 @@ class TestConstraint(ERP5TypeTestCase):
group=None, group=None,
portal_type = ('Organisation', )) portal_type = ('Organisation', ))
def test_05_CategoryExistence(self, quiet=0, run=run_all_test): def test_05_CategoryExistence(self, quiet=quiet, run=run_all_test):
""" """
Test category existence Test category existence
""" """
...@@ -676,7 +678,7 @@ class TestConstraint(ERP5TypeTestCase): ...@@ -676,7 +678,7 @@ class TestConstraint(ERP5TypeTestCase):
CheckIfConstraintSucceeded \ CheckIfConstraintSucceeded \
' '
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self, quiet=quiet)
def stepCreateCategoryMembershipArity0(self, sequence=None, def stepCreateCategoryMembershipArity0(self, sequence=None,
sequence_list=None, **kw): sequence_list=None, **kw):
...@@ -748,7 +750,7 @@ class TestConstraint(ERP5TypeTestCase): ...@@ -748,7 +750,7 @@ class TestConstraint(ERP5TypeTestCase):
portal_type=('Category', ), portal_type=('Category', ),
base_category=('group', )) base_category=('group', ))
def test_06_CategoryMembershipArity(self, quiet=0, run=run_all_test): def test_06_CategoryMembershipArity(self, quiet=quiet, run=run_all_test):
""" """
Test category existence Test category existence
""" """
...@@ -899,7 +901,7 @@ class TestConstraint(ERP5TypeTestCase): ...@@ -899,7 +901,7 @@ class TestConstraint(ERP5TypeTestCase):
CheckIfConstraintSucceeded \ CheckIfConstraintSucceeded \
' '
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self, quiet=quiet)
def stepCreateCategoryRelatedMembershipArity0(self, sequence=None, def stepCreateCategoryRelatedMembershipArity0(self, sequence=None,
sequence_list=None, **kw): sequence_list=None, **kw):
...@@ -946,7 +948,7 @@ class TestConstraint(ERP5TypeTestCase): ...@@ -946,7 +948,7 @@ class TestConstraint(ERP5TypeTestCase):
portal_type=('Organisation', ), portal_type=('Organisation', ),
base_category=('group', )) base_category=('group', ))
def test_07_CategoryRelatedMembershipArity(self, quiet=0, run=run_all_test): def test_07_CategoryRelatedMembershipArity(self, quiet=quiet, run=run_all_test):
""" """
Test related category existence Test related category existence
""" """
...@@ -1015,7 +1017,7 @@ class TestConstraint(ERP5TypeTestCase): ...@@ -1015,7 +1017,7 @@ class TestConstraint(ERP5TypeTestCase):
CheckIfConstraintFailed \ CheckIfConstraintFailed \
' '
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self, quiet=quiet)
if __name__ == '__main__': if __name__ == '__main__':
framework() framework()
......
...@@ -53,10 +53,7 @@ class TestXMLMatrix(ERP5TypeTestCase): ...@@ -53,10 +53,7 @@ class TestXMLMatrix(ERP5TypeTestCase):
""" """
Tests the Cell API Tests the Cell API
""" """
quiet = 1
# Some helper methods
#def afterSetUp(self):
def getBusinessTemplateList(self): def getBusinessTemplateList(self):
""" """
...@@ -74,7 +71,6 @@ class TestXMLMatrix(ERP5TypeTestCase): ...@@ -74,7 +71,6 @@ class TestXMLMatrix(ERP5TypeTestCase):
""" """
Some pre-configuration Some pre-configuration
""" """
LOG('afterSetUp', 0, 'Called')
uf = self.getPortal().acl_users uf = self.getPortal().acl_users
uf._doAddUser('manager', '', ['Manager'], []) uf._doAddUser('manager', '', ['Manager'], [])
user = uf.getUserById('manager').__of__(uf) user = uf.getUserById('manager').__of__(uf)
...@@ -84,11 +80,12 @@ class TestXMLMatrix(ERP5TypeTestCase): ...@@ -84,11 +80,12 @@ class TestXMLMatrix(ERP5TypeTestCase):
if '1' not in module.objectIds(): if '1' not in module.objectIds():
order = module.newContent(id='1', portal_type='Purchase Order') order = module.newContent(id='1', portal_type='Purchase Order')
def test_01_RenameCellRange(self): def test_01_RenameCellRange(self, quiet=quiet):
""" """
tests renameCellRange behaviour tests renameCellRange behaviour
""" """
ZopeTestCase._print('\nTest Rename Cell Range ') if not quiet:
ZopeTestCase._print('\nTest Rename Cell Range ')
portal = self.getPortal() portal = self.getPortal()
module = portal.purchase_order_module module = portal.purchase_order_module
order = module._getOb('1') order = module._getOb('1')
...@@ -262,22 +259,23 @@ class TestXMLMatrix(ERP5TypeTestCase): ...@@ -262,22 +259,23 @@ class TestXMLMatrix(ERP5TypeTestCase):
cell_path = url + '/' + id cell_path = url + '/' + id
self.assertEquals(catalog.hasPath(cell_path),False) self.assertEquals(catalog.hasPath(cell_path),False)
def test_02_SetCellRangeAndCatalogWithActivities(self): def test_02_SetCellRangeAndCatalogWithActivities(self, quiet=quiet):
""" """
Tests if set Cell range do well catalog and uncatalog, using activities Tests if set Cell range do well catalog and uncatalog, using activities
""" """
ZopeTestCase._print('\nTest Set Cell Range And Catalog With Activities ') if not quiet:
ZopeTestCase._print('\nTest Set Cell Range And Catalog With Activities ')
self.checkSetCellRangeAndCatalog(active=1) self.checkSetCellRangeAndCatalog(active=1)
def test_03_SetCellRangeAndCatalogWithoutActivities(self): def test_03_SetCellRangeAndCatalogWithoutActivities(self, quiet=quiet):
""" """
Tests if set Cell range do well catalog and uncatalog, not using Tests if set Cell range do well catalog and uncatalog, not using
activities activities
""" """
ZopeTestCase._print('\nTest Set Cell Range And Catalog Without Activities ') if not quiet:
ZopeTestCase._print('\nTest Set Cell Range And Catalog Without Activities ')
self.checkSetCellRangeAndCatalog(active=0) self.checkSetCellRangeAndCatalog(active=0)
if __name__ == '__main__': if __name__ == '__main__':
framework() framework()
else: else:
......
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