Commit a444dc5f authored by Shane Hathaway's avatar Shane Hathaway

Fixed timezone dependence of the ZEO pack test.

parent eb444b8b
...@@ -73,11 +73,13 @@ Options: ...@@ -73,11 +73,13 @@ Options:
-U UNIX Deprecated: Used with the -S option, Unix-domain -U UNIX Deprecated: Used with the -S option, Unix-domain
socket to connect to. 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 >>> import time
>>> time_orig = time.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 >>> sleep_orig = time.sleep
>>> def sleep(t): >>> def sleep(t):
... print 'sleep(%r)' % t ... print 'sleep(%r)' % t
......
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