Commit 68590071 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent c21c3730
...@@ -7,6 +7,7 @@ from persistent import Persistent ...@@ -7,6 +7,7 @@ from persistent import Persistent
import transaction import transaction
import struct import struct
import time
import random import random
import logging import logging
...@@ -14,6 +15,15 @@ import logging ...@@ -14,6 +15,15 @@ import logging
def oid(v): def oid(v):
return struct.pack('>Q', v) return struct.pack('>Q', v)
# make time.time() predictable
_xtime = time.mktime(time.strptime("04 Jan 1979", "%d %b %Y"))
def xtime():
global _xtime
_xtime += 1.1
return _xtime
time.time = xtime
def commit(user, description, extension): def commit(user, description, extension):
txn = transaction.get() txn = transaction.get()
txn.user = user txn.user = user
...@@ -44,6 +54,7 @@ def main(): ...@@ -44,6 +54,7 @@ def main():
# generate random changes to objects hooked to top-level root by a/b/c/... key # generate random changes to objects hooked to top-level root by a/b/c/... key
random.seed(0) random.seed(0)
namev = [_ for _ in "abcdefg"] namev = [_ for _ in "abcdefg"]
for i in range(50): for i in range(50):
name = random.choice(namev) name = random.choice(namev)
......
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