[Zodb-checkins] SVN: ZODB/trunk/src/ZEO/scripts/zeopack.test Fixed timezone dependence of the ZEO pack test.

Shane Hathaway shane at hathawaymix.org
Sat May 16 16:40:12 EDT 2009


Log message for revision 100020:
  Fixed timezone dependence of the ZEO pack test.
  

Changed:
  U   ZODB/trunk/src/ZEO/scripts/zeopack.test

-=-
Modified: ZODB/trunk/src/ZEO/scripts/zeopack.test
===================================================================
--- ZODB/trunk/src/ZEO/scripts/zeopack.test	2009-05-16 20:35:34 UTC (rev 100019)
+++ ZODB/trunk/src/ZEO/scripts/zeopack.test	2009-05-16 20:40:12 UTC (rev 100020)
@@ -73,11 +73,13 @@
   -U UNIX               Deprecated: Used with the -S option, Unix-domain
                         socket to connect to.
 
-Since packing involved time, we'd better have our way with it:
+Since packing involves time, we'd better have our way with it.  Replace
+time.time() with a function that always returns the same value.  The
+value is timezone dependent.
 
     >>> import time
     >>> time_orig = time.time
-    >>> time.time = lambda : 1237906517.0
+    >>> time.time = lambda : time.mktime((2009, 3, 24, 10, 55, 17, 1, 83, -1))
     >>> sleep_orig = time.sleep
     >>> def sleep(t):
     ...     print 'sleep(%r)' % t



More information about the Zodb-checkins mailing list