[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/DateIndex/tests - test_DateIndex.py:1.4.6.2

Tres Seaver tseaver at zope.com
Fri Dec 19 12:26:02 EST 2003


Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/DateIndex/tests
In directory cvs.zope.org:/tmp/cvs-serv2789/lib/python/Products/PluginIndexes/DateIndex/tests

Modified Files:
      Tag: Zope-2_6-branch
	test_DateIndex.py 
Log Message:


  Backport assorted fixes for running Zope 2.6.x tests under Python 2.3.

  - lib/python/Products/PluginIndexes/DateIndex:

    o Deal with the fact that in Python 2.3, int can return a long
      instead of throwing OverflowError.

  - lib/python/Products/PageTemplates/tests:

    o Fix spurious error in PageTemplates; no longer rely on the str() of
      exception objects since the value of their str() is not part of their
      API, and can vary between Python releases.

  The following now shows 1781 tests passing, albeit with a number of
  PendingDeprecationWarnings::

    $ python2.3 utilities/testrunner.py -a -v


=== Zope/lib/python/Products/PluginIndexes/DateIndex/tests/test_DateIndex.py 1.4.6.1 => 1.4.6.2 ===
--- Zope/lib/python/Products/PluginIndexes/DateIndex/tests/test_DateIndex.py:1.4.6.1	Sun Jun  8 04:52:51 2003
+++ Zope/lib/python/Products/PluginIndexes/DateIndex/tests/test_DateIndex.py	Fri Dec 19 12:26:00 2003
@@ -38,14 +38,14 @@
 class DI_Tests(unittest.TestCase):
     def setUp(self):
         self._values = (
-            (0, Dummy('a', None)),
-            (1, Dummy('b', DateTime(0))),
-            (2, Dummy('c', DateTime('2002-05-08 15:16:17'))),
-            (3, Dummy('d', DateTime('2032-05-08 15:16:17'))),
-            (4, Dummy('e', DateTime('2062-05-08 15:16:17'))),
-            (5, Dummy('e', DateTime('2062-05-08 15:16:17'))),
-            (6, Dummy('f', 1072742620.0)),
-            (7, Dummy('f', 1072742900)),
+            (0, Dummy('a', None)),                            # None
+            (1, Dummy('b', DateTime(0))),                     # 1055335680
+            (2, Dummy('c', DateTime('2002-05-08 15:16:17'))), # 1072667236
+            (3, Dummy('d', DateTime('2032-05-08 15:16:17'))), # 1088737636
+            (4, Dummy('e', DateTime('2062-05-08 15:16:17'))), # 1018883325
+            (5, Dummy('e', DateTime('2062-05-08 15:16:17'))), # 1018883325
+            (6, Dummy('f', 1072742620.0)),                    # 1073545923
+            (7, Dummy('f', 1072742900)),                      # 1073545928
         )
         self._index = DateIndex('date')
         self._noop_req  = {'bar': 123}




More information about the Zope-Checkins mailing list