Commit 61e37be5 authored by Chris McDonough's avatar Chris McDonough

Change TOC tests to deal with speed difference in fauxtime.

parent 0f199821
...@@ -222,10 +222,9 @@ class TestTransientObjectContainer(TestBase): ...@@ -222,10 +222,9 @@ class TestTransientObjectContainer(TestBase):
r = range(10, 1010) r = range(10, 1010)
for x in r: for x in r:
self.t[x] = 1 self.t[x] = 1
assert lsubtract(self.t.keys(), r) == [] assert list(self.t.keys()) == r, (self.t.keys(), r)
for x in r: map(self.t.__delitem__, r)
del self.t[x] assert list(self.t.keys()) == [], self.t.keys()
assert lsubtract(self.t.keys(), []) == [], self.t.keys()
def testPathologicalLeftBranching(self): def testPathologicalLeftBranching(self):
r = range(10, 1010) r = range(10, 1010)
...@@ -233,10 +232,9 @@ class TestTransientObjectContainer(TestBase): ...@@ -233,10 +232,9 @@ class TestTransientObjectContainer(TestBase):
revr.reverse() revr.reverse()
for x in revr: for x in revr:
self.t[x] = 1 self.t[x] = 1
assert lsubtract(self.t.keys(),r) == [] assert list(self.t.keys()) == r, (self.t.keys(), r)
for x in revr: map(self.t.__delitem__, revr)
del self.t[x] assert list(self.t.keys()) == [], self.t.keys()
assert lsubtract(self.t.keys(),[]) == [], self.t.keys()
def donttestSuccessorChildParentRewriteExerciseCase(self): def donttestSuccessorChildParentRewriteExerciseCase(self):
add_order = [ add_order = [
...@@ -285,7 +283,6 @@ class TestTransientObjectContainer(TestBase): ...@@ -285,7 +283,6 @@ class TestTransientObjectContainer(TestBase):
if self.t.has_key(x): assert 1==2,"failed to delete %s" % x if self.t.has_key(x): assert 1==2,"failed to delete %s" % x
def testChangingTimeoutWorks(self): def testChangingTimeoutWorks(self):
# XXX This test takes nearly 40 seconds on my machine!
# 1 minute # 1 minute
for x in range(10, 110): for x in range(10, 110):
self.t[x] = x self.t[x] = x
......
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