[Zope-Checkins] CVS: Zope/lib/python/Products/Transience/tests - testTransientObjectContainer.py:1.13
Chris McDonough
chrism@zope.com
Thu, 30 Jan 2003 20:35:08 -0500
Update of /cvs-repository/Zope/lib/python/Products/Transience/tests
In directory cvs.zope.org:/tmp/cvs-serv9284/tests
Modified Files:
testTransientObjectContainer.py
Log Message:
Change TOC tests to deal with speed difference in fauxtime.
=== Zope/lib/python/Products/Transience/tests/testTransientObjectContainer.py 1.12 => 1.13 ===
--- Zope/lib/python/Products/Transience/tests/testTransientObjectContainer.py:1.12 Thu Jan 30 17:13:40 2003
+++ Zope/lib/python/Products/Transience/tests/testTransientObjectContainer.py Thu Jan 30 20:35:06 2003
@@ -222,10 +222,9 @@
r = range(10, 1010)
for x in r:
self.t[x] = 1
- assert lsubtract(self.t.keys(), r) == []
- for x in r:
- del self.t[x]
- assert lsubtract(self.t.keys(), []) == [], self.t.keys()
+ assert list(self.t.keys()) == r, (self.t.keys(), r)
+ map(self.t.__delitem__, r)
+ assert list(self.t.keys()) == [], self.t.keys()
def testPathologicalLeftBranching(self):
r = range(10, 1010)
@@ -233,10 +232,9 @@
revr.reverse()
for x in revr:
self.t[x] = 1
- assert lsubtract(self.t.keys(),r) == []
- for x in revr:
- del self.t[x]
- assert lsubtract(self.t.keys(),[]) == [], self.t.keys()
+ assert list(self.t.keys()) == r, (self.t.keys(), r)
+ map(self.t.__delitem__, revr)
+ assert list(self.t.keys()) == [], self.t.keys()
def donttestSuccessorChildParentRewriteExerciseCase(self):
add_order = [
@@ -285,7 +283,6 @@
if self.t.has_key(x): assert 1==2,"failed to delete %s" % x
def testChangingTimeoutWorks(self):
- # XXX This test takes nearly 40 seconds on my machine!
# 1 minute
for x in range(10, 110):
self.t[x] = x