[Checkins] SVN: Products.ZCatalog/trunk/src/Products/ZCatalog/tests/test_ remove explicit test_suite functions
Hano Schlichting
cvs-admin at zope.org
Sat Apr 7 13:13:17 UTC 2012
Log message for revision 125070:
remove explicit test_suite functions
Changed:
U Products.ZCatalog/trunk/src/Products/ZCatalog/tests/test_brains.py
U Products.ZCatalog/trunk/src/Products/ZCatalog/tests/test_catalog.py
U Products.ZCatalog/trunk/src/Products/ZCatalog/tests/test_lazy.py
U Products.ZCatalog/trunk/src/Products/ZCatalog/tests/test_zcatalog.py
-=-
Modified: Products.ZCatalog/trunk/src/Products/ZCatalog/tests/test_brains.py
===================================================================
--- Products.ZCatalog/trunk/src/Products/ZCatalog/tests/test_brains.py 2012-04-07 13:10:46 UTC (rev 125069)
+++ Products.ZCatalog/trunk/src/Products/ZCatalog/tests/test_brains.py 2012-04-07 13:13:14 UTC (rev 125070)
@@ -10,8 +10,6 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""Unittests for Catalog brains
-"""
import unittest
@@ -198,9 +196,3 @@
self.assertEqual(b.getPath(), '/zonked')
self.assertRaises(AttributeError, self.cat.getobject, 3)
self.assertRaises((NotFound, AttributeError, KeyError), b.getObject)
-
-
-def test_suite():
- suite = unittest.TestSuite()
- suite.addTest(unittest.makeSuite(TestBrains))
- return suite
Modified: Products.ZCatalog/trunk/src/Products/ZCatalog/tests/test_catalog.py
===================================================================
--- Products.ZCatalog/trunk/src/Products/ZCatalog/tests/test_catalog.py 2012-04-07 13:10:46 UTC (rev 125069)
+++ Products.ZCatalog/trunk/src/Products/ZCatalog/tests/test_catalog.py 2012-04-07 13:13:14 UTC (rev 125070)
@@ -10,8 +10,6 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-""" Unittests for Catalog.
-"""
import unittest
from Testing.ZopeTestCase.warnhook import WarningsHook
@@ -823,16 +821,3 @@
brains = cat(title='1*', true=True)
self.assertEqual(len(brains), 4)
self.assertEqual(brains[0].title, '111')
-
-
-def test_suite():
- suite = unittest.TestSuite()
- suite.addTest(unittest.makeSuite(TestAddDelColumn))
- suite.addTest(unittest.makeSuite(TestAddDelIndexes))
- suite.addTest(unittest.makeSuite(TestCatalog))
- suite.addTest(unittest.makeSuite(TestRangeSearch))
- suite.addTest(unittest.makeSuite(TestCatalogReturnAll))
- suite.addTest(unittest.makeSuite(TestCatalogSearchArgumentsMap))
- suite.addTest(unittest.makeSuite(TestMergeResults))
- suite.addTest(unittest.makeSuite(TestScoring))
- return suite
Modified: Products.ZCatalog/trunk/src/Products/ZCatalog/tests/test_lazy.py
===================================================================
--- Products.ZCatalog/trunk/src/Products/ZCatalog/tests/test_lazy.py 2012-04-07 13:10:46 UTC (rev 125069)
+++ Products.ZCatalog/trunk/src/Products/ZCatalog/tests/test_lazy.py 2012-04-07 13:13:14 UTC (rev 125070)
@@ -10,13 +10,11 @@
# FOR A PARTICULAR PURPOSE
#
##############################################################################
-"""Unittests for Lazy sequence classes
-"""
import unittest
-class BaseSequenceTest(unittest.TestCase):
+class BaseSequenceTest(object):
def _compare(self, lseq, seq):
self.assertEqual(len(lseq), len(seq))
@@ -32,7 +30,7 @@
self.assertEqual(lcat.actual_result_count, 20)
-class TestLazyCat(BaseSequenceTest):
+class TestLazyCat(unittest.TestCase, BaseSequenceTest):
def _createLSeq(self, *sequences):
from Products.ZCatalog.Lazy import LazyCat
@@ -262,7 +260,7 @@
self.assertEqual(len(lmop), letter_length)
-class TestLazyValues(BaseSequenceTest):
+class TestLazyValues(unittest.TestCase, BaseSequenceTest):
def _createLSeq(self, seq):
from Products.ZCatalog.Lazy import LazyValues
@@ -283,13 +281,3 @@
seq = zip(letters, range(10))
lvals = self._createLSeq(seq)
self._compare(lvals[2:-2], range(2, 8))
-
-
-def test_suite():
- suite = unittest.TestSuite()
- suite.addTest(unittest.makeSuite(TestLazyCat))
- suite.addTest(unittest.makeSuite(TestLazyMap))
- suite.addTest(unittest.makeSuite(TestLazyFilter))
- suite.addTest(unittest.makeSuite(TestLazyMop))
- suite.addTest(unittest.makeSuite(TestLazyValues))
- return suite
Modified: Products.ZCatalog/trunk/src/Products/ZCatalog/tests/test_zcatalog.py
===================================================================
--- Products.ZCatalog/trunk/src/Products/ZCatalog/tests/test_zcatalog.py 2012-04-07 13:10:46 UTC (rev 125069)
+++ Products.ZCatalog/trunk/src/Products/ZCatalog/tests/test_zcatalog.py 2012-04-07 13:13:14 UTC (rev 125070)
@@ -10,8 +10,6 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-""" Unittests for ZCatalog
-"""
import unittest
@@ -432,11 +430,3 @@
del root.ob
self.assertRaises((NotFound, AttributeError, KeyError),
brain._unrestrictedGetObject)
-
-
-def test_suite():
- suite = unittest.TestSuite()
- suite.addTest(unittest.makeSuite(TestZCatalog))
- suite.addTest(unittest.makeSuite(TestAddDelColumnIndex))
- suite.addTest(unittest.makeSuite(TestZCatalogGetObject))
- return suite
More information about the checkins
mailing list