Commit af20d2f6 authored by Jim Fulton's avatar Jim Fulton

Go back to messing with time

Tp get predictiable time specing to avoid spurious failures.
parent bda016b1
...@@ -6,6 +6,18 @@ special tests. ...@@ -6,6 +6,18 @@ special tests.
We'll make some assertions about time, so we'll take it over: We'll make some assertions about time, so we'll take it over:
>>> now = 1229959248
>>> def faux_time():
... global now
... now += 0.1
... return now
>>> import time
>>> time_time = time.time
>>> if isinstance(time,type):
... time.time = staticmethod(faux_time) # Jython
... else:
... time.time = faux_time
Commit a bunch of transactions: Commit a bunch of transactions:
>>> import ZODB.FileStorage, transaction >>> import ZODB.FileStorage, transaction
...@@ -166,4 +178,5 @@ Even if we write more transactions: ...@@ -166,4 +178,5 @@ Even if we write more transactions:
.. Cleanup .. Cleanup
>>> time.time = time_time
>>> db.close() >>> db.close()
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