[Checkins] SVN: Products.ZCatalog/trunk/src/Products/PluginIndexes/ remove explicit test_suite functions

Hano Schlichting cvs-admin at zope.org
Sun Mar 25 13:33:35 UTC 2012


Log message for revision 124720:
  remove explicit test_suite functions
  

Changed:
  U   Products.ZCatalog/trunk/src/Products/PluginIndexes/BooleanIndex/tests.py
  U   Products.ZCatalog/trunk/src/Products/PluginIndexes/DateIndex/tests/test_DateIndex.py
  U   Products.ZCatalog/trunk/src/Products/PluginIndexes/DateRangeIndex/tests/test_DateRangeIndex.py
  U   Products.ZCatalog/trunk/src/Products/PluginIndexes/FieldIndex/tests/testFieldIndex.py
  U   Products.ZCatalog/trunk/src/Products/PluginIndexes/KeywordIndex/tests/testKeywordIndex.py
  U   Products.ZCatalog/trunk/src/Products/PluginIndexes/PathIndex/tests/testPathIndex.py
  U   Products.ZCatalog/trunk/src/Products/PluginIndexes/TopicIndex/tests/testTopicIndex.py
  U   Products.ZCatalog/trunk/src/Products/PluginIndexes/UUIDIndex/tests.py
  U   Products.ZCatalog/trunk/src/Products/PluginIndexes/common/tests/test_UnIndex.py
  U   Products.ZCatalog/trunk/src/Products/PluginIndexes/common/tests/test_util.py

-=-
Modified: Products.ZCatalog/trunk/src/Products/PluginIndexes/BooleanIndex/tests.py
===================================================================
--- Products.ZCatalog/trunk/src/Products/PluginIndexes/BooleanIndex/tests.py	2012-03-25 13:29:50 UTC (rev 124719)
+++ Products.ZCatalog/trunk/src/Products/PluginIndexes/BooleanIndex/tests.py	2012-03-25 13:33:32 UTC (rev 124720)
@@ -216,10 +216,3 @@
         self.assertEqual(index._index_value, 0)
         self.assertEqual(index._index_length.value, 19)
         self.assertEqual(list(index._index), range(80, 99))
-
-
-def test_suite():
-    from unittest import TestSuite, makeSuite
-    suite = TestSuite()
-    suite.addTest(makeSuite(TestBooleanIndex))
-    return suite

Modified: Products.ZCatalog/trunk/src/Products/PluginIndexes/DateIndex/tests/test_DateIndex.py
===================================================================
--- Products.ZCatalog/trunk/src/Products/PluginIndexes/DateIndex/tests/test_DateIndex.py	2012-03-25 13:29:50 UTC (rev 124719)
+++ Products.ZCatalog/trunk/src/Products/PluginIndexes/DateIndex/tests/test_DateIndex.py	2012-03-25 13:33:32 UTC (rev 124720)
@@ -15,11 +15,11 @@
 
 import unittest
 
+
 class Dummy:
 
     def __init__(self, name, date):
-
-        self._name  = name
+        self._name = name
         self._date = date
 
     def name(self):
@@ -274,9 +274,3 @@
                          {'date': 1072742900}, [values[7]])
         index.index_object(7, None)
         self.assertFalse(7 in index.documentToKeyMap().keys())
-
-
-def test_suite():
-    suite = unittest.TestSuite()
-    suite.addTest( unittest.makeSuite( DI_Tests ) )
-    return suite

Modified: Products.ZCatalog/trunk/src/Products/PluginIndexes/DateRangeIndex/tests/test_DateRangeIndex.py
===================================================================
--- Products.ZCatalog/trunk/src/Products/PluginIndexes/DateRangeIndex/tests/test_DateRangeIndex.py	2012-03-25 13:29:50 UTC (rev 124719)
+++ Products.ZCatalog/trunk/src/Products/PluginIndexes/DateRangeIndex/tests/test_DateRangeIndex.py	2012-03-25 13:33:32 UTC (rev 124720)
@@ -17,9 +17,9 @@
 class Dummy(object):
 
     def __init__(self, name, start, stop):
-        self._name  = name
+        self._name = name
         self._start = start
-        self._stop  = stop
+        self._stop = stop
 
     def name(self):
         return self._name
@@ -246,9 +246,3 @@
         results, used = index._apply_index({'work': 11},
             resultset=IISet([0, 5, 7]))
         self.assertEqual(set(results), set([0, 5]))
-
-
-def test_suite():
-    suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(DRI_Tests))
-    return suite

Modified: Products.ZCatalog/trunk/src/Products/PluginIndexes/FieldIndex/tests/testFieldIndex.py
===================================================================
--- Products.ZCatalog/trunk/src/Products/PluginIndexes/FieldIndex/tests/testFieldIndex.py	2012-03-25 13:29:50 UTC (rev 124719)
+++ Products.ZCatalog/trunk/src/Products/PluginIndexes/FieldIndex/tests/testFieldIndex.py	2012-03-25 13:33:32 UTC (rev 124720)
@@ -229,9 +229,3 @@
         r2, ignore = index._apply_index(record)
         r2 = list(r2.keys())
         assert r2 == r
-
-
-def test_suite():
-    return unittest.TestSuite((
-        unittest.makeSuite(FieldIndexTests),
-        ))

Modified: Products.ZCatalog/trunk/src/Products/PluginIndexes/KeywordIndex/tests/testKeywordIndex.py
===================================================================
--- Products.ZCatalog/trunk/src/Products/PluginIndexes/KeywordIndex/tests/testKeywordIndex.py	2012-03-25 13:29:50 UTC (rev 124719)
+++ Products.ZCatalog/trunk/src/Products/PluginIndexes/KeywordIndex/tests/testKeywordIndex.py	2012-03-25 13:33:32 UTC (rev 124720)
@@ -239,9 +239,3 @@
         to_index = Dummy('')
         self._index._index_object(10, to_index, attr='foo')
         self.assertFalse(self._index._unindex.get(10))
-
-
-def test_suite():
-    suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(TestKeywordIndex))
-    return suite

Modified: Products.ZCatalog/trunk/src/Products/PluginIndexes/PathIndex/tests/testPathIndex.py
===================================================================
--- Products.ZCatalog/trunk/src/Products/PluginIndexes/PathIndex/tests/testPathIndex.py	2012-03-25 13:29:50 UTC (rev 124719)
+++ Products.ZCatalog/trunk/src/Products/PluginIndexes/PathIndex/tests/testPathIndex.py	2012-03-25 13:33:32 UTC (rev 124720)
@@ -16,9 +16,9 @@
 import unittest
 
 
-
 class Dummy:
-    def __init__( self, path):
+
+    def __init__(self, path):
         self.path = path
 
     def getPhysicalPath(self):
@@ -527,9 +527,3 @@
         self.assertEqual(list(index._search('bb', 1)), [1])
         self.assertEqual(list(index._search('aa/bb', 0)), [1])
         self.assertEqual(list(index._search('aa/bb', 1)), [])
-
-
-def test_suite():
-    return unittest.TestSuite((
-            unittest.makeSuite(PathIndexTests),
-        ))

Modified: Products.ZCatalog/trunk/src/Products/PluginIndexes/TopicIndex/tests/testTopicIndex.py
===================================================================
--- Products.ZCatalog/trunk/src/Products/PluginIndexes/TopicIndex/tests/testTopicIndex.py	2012-03-25 13:29:50 UTC (rev 124719)
+++ Products.ZCatalog/trunk/src/Products/PluginIndexes/TopicIndex/tests/testTopicIndex.py	2012-03-25 13:33:32 UTC (rev 124720)
@@ -86,9 +86,3 @@
         self.TI.index_object(1, Obj('1','doc2'))
         self._searchOr('doc1',[2])
         self._searchOr('doc2', [1,3,4])
-
-
-def test_suite():
-    return unittest.TestSuite((
-        unittest.makeSuite(TestTopicIndex),
-        ))

Modified: Products.ZCatalog/trunk/src/Products/PluginIndexes/UUIDIndex/tests.py
===================================================================
--- Products.ZCatalog/trunk/src/Products/PluginIndexes/UUIDIndex/tests.py	2012-03-25 13:29:50 UTC (rev 124719)
+++ Products.ZCatalog/trunk/src/Products/PluginIndexes/UUIDIndex/tests.py	2012-03-25 13:33:32 UTC (rev 124720)
@@ -131,9 +131,3 @@
         # second index call fails and logs
         self._index.index_object(1, obj)
         self._checkApply({'foo': 'a'}, [(0, obj)])
-
-
-def test_suite():
-    return unittest.TestSuite((
-        unittest.makeSuite(UUIDIndexTests),
-        ))

Modified: Products.ZCatalog/trunk/src/Products/PluginIndexes/common/tests/test_UnIndex.py
===================================================================
--- Products.ZCatalog/trunk/src/Products/PluginIndexes/common/tests/test_UnIndex.py	2012-03-25 13:29:50 UTC (rev 124719)
+++ Products.ZCatalog/trunk/src/Products/PluginIndexes/common/tests/test_UnIndex.py	2012-03-25 13:33:32 UTC (rev 124720)
@@ -10,11 +10,10 @@
 # FOR A PARTICULAR PURPOSE
 #
 #############################################################################
-""" Tests for common UnIndex features.
-"""
 
 import unittest
 
+
 class UnIndexTests(unittest.TestCase):
 
     def _getTargetClass(self):
@@ -71,9 +70,3 @@
 
         dummy.exc = TypeError
         self.assertEquals(idx._get_object_datum(dummy, 'interesting'), _marker)
-
-
-def test_suite():
-    suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(UnIndexTests))
-    return suite

Modified: Products.ZCatalog/trunk/src/Products/PluginIndexes/common/tests/test_util.py
===================================================================
--- Products.ZCatalog/trunk/src/Products/PluginIndexes/common/tests/test_util.py	2012-03-25 13:29:50 UTC (rev 124719)
+++ Products.ZCatalog/trunk/src/Products/PluginIndexes/common/tests/test_util.py	2012-03-25 13:33:32 UTC (rev 124720)
@@ -10,8 +10,6 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
-"""Unit tests for util module.
-"""
 
 import unittest
 
@@ -76,9 +74,3 @@
         parser = self._makeOne(request, 'path', ('query', 'not'))
         self.assertEqual(parser.get('keys'), ['foo'])
         self.assertEqual(parser.get('not'), ['bar', 'baz'])
-
-
-def test_suite():
-    suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(parseIndexRequestTests))
-    return suite



More information about the checkins mailing list