Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
ZODB
Commits
4efb5208
Commit
4efb5208
authored
Mar 17, 2003
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport snooze() helper from ZODB4.
parent
024bf384
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
src/ZODB/tests/StorageTestBase.py
src/ZODB/tests/StorageTestBase.py
+10
-0
No files found.
src/ZODB/tests/StorageTestBase.py
View file @
4efb5208
...
@@ -24,6 +24,7 @@ import os
...
@@ -24,6 +24,7 @@ import os
import
pickle
import
pickle
import
string
import
string
import
sys
import
sys
import
time
import
types
import
types
import
unittest
import
unittest
from
cPickle
import
Pickler
,
Unpickler
from
cPickle
import
Pickler
,
Unpickler
...
@@ -35,6 +36,15 @@ from ZODB.tests.MinPO import MinPO
...
@@ -35,6 +36,15 @@ from ZODB.tests.MinPO import MinPO
ZERO
=
'
\
0
'
*
8
ZERO
=
'
\
0
'
*
8
def
snooze
():
# In Windows, it's possible that two successive time.time() calls return
# the same value. Tim guarantees that time never runs backwards. You
# usually want to call this before you pack a storage, or must make other
# guarantees about increasing timestamps.
now
=
time
.
time
()
while
now
==
time
.
time
():
time
.
sleep
(
0.1
)
def
zodb_pickle
(
obj
):
def
zodb_pickle
(
obj
):
"""Create a pickle in the format expected by ZODB."""
"""Create a pickle in the format expected by ZODB."""
f
=
StringIO
()
f
=
StringIO
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment