[Zope3-checkins] CVS: ZODB/src/ZODB/tests - PackableStorage.py:1.40
sampledm.py:1.3 testBroken.py:1.5 testCache.py:1.23
test_cache.py:1.6 util.py:1.5 warnhook.py:1.2
Tim Peters
tim.one at comcast.net
Mon Apr 19 17:19:39 EDT 2004
Update of /cvs-repository/ZODB/src/ZODB/tests
In directory cvs.zope.org:/tmp/cvs-serv9699/src/ZODB/tests
Modified Files:
PackableStorage.py sampledm.py testBroken.py testCache.py
test_cache.py util.py warnhook.py
Log Message:
Whitespace normalization.
=== ZODB/src/ZODB/tests/PackableStorage.py 1.39 => 1.40 ===
--- ZODB/src/ZODB/tests/PackableStorage.py:1.39 Fri Apr 16 11:58:11 2004
+++ ZODB/src/ZODB/tests/PackableStorage.py Mon Apr 19 17:19:07 2004
@@ -281,9 +281,9 @@
packt = time.time()
for dummy in choices:
- for i in choices:
- root[i].value = MinPO(i)
- transaction.commit()
+ for i in choices:
+ root[i].value = MinPO(i)
+ transaction.commit()
NUM_LOOP_TRIP = 100
timer = ElapsedTimer(time.time())
=== ZODB/src/ZODB/tests/sampledm.py 1.2 => 1.3 ===
--- ZODB/src/ZODB/tests/sampledm.py:1.2 Wed Feb 18 21:59:10 2004
+++ ZODB/src/ZODB/tests/sampledm.py Mon Apr 19 17:19:07 2004
@@ -78,7 +78,7 @@
>>> dm.commit(t1)
Our changes are"permanent". The state reflects the changes and the
- delta has been reset to 0.
+ delta has been reset to 0.
>>> dm.state
1
@@ -139,7 +139,7 @@
TypeError: ('Transaction missmatch', '2', '1')
>>> dm.prepare(t1)
-
+
"""
if self.prepared:
raise TypeError('Already prepared')
@@ -183,7 +183,7 @@
If savepoints are used, abort must be passed the same
transaction:
-
+
>>> dm.inc()
>>> r = dm.savepoint(t1)
>>> t2 = '2'
@@ -208,15 +208,15 @@
Of course, the transactions passed to prepare and abort must
match:
-
+
>>> dm.prepare(t1)
>>> dm.abort(t2)
Traceback (most recent call last):
...
TypeError: ('Transaction missmatch', '2', '1')
-
+
>>> dm.abort(t1)
-
+
"""
self._checkTransaction(transaction)
@@ -262,7 +262,7 @@
If course, the transactions given to prepare and commit must
be the same:
-
+
>>> dm.inc()
>>> t3 = '3'
>>> dm.prepare(t3)
@@ -270,7 +270,7 @@
Traceback (most recent call last):
...
TypeError: ('Transaction missmatch', '2', '3')
-
+
"""
if not self.prepared:
raise TypeError('Not prepared to commit')
=== ZODB/src/ZODB/tests/testBroken.py 1.4 => 1.5 ===
--- ZODB/src/ZODB/tests/testBroken.py:1.4 Fri Apr 16 11:58:11 2004
+++ ZODB/src/ZODB/tests/testBroken.py Mon Apr 19 17:19:07 2004
@@ -29,7 +29,7 @@
>>> db = DB()
We'll create a fake module with a class:
-
+
>>> class NotThere:
... Atall = type('Atall', (persistent.Persistent, ),
... {'__module__': 'ZODB.not.there'})
@@ -70,7 +70,7 @@
>>> a3.__Broken_state__
{'x': 1}
-
+
Let's clean up:
>>> db.close()
=== ZODB/src/ZODB/tests/testCache.py 1.22 => 1.23 ===
--- ZODB/src/ZODB/tests/testCache.py:1.22 Fri Apr 16 11:58:11 2004
+++ ZODB/src/ZODB/tests/testCache.py Mon Apr 19 17:19:07 2004
@@ -178,7 +178,7 @@
CONNS = 3
for i in range(CONNS):
self.noodle_new_connection()
-
+
self.assertEquals(self.db.cacheSize(), CACHE_SIZE * CONNS)
details = self.db.cacheDetailSize()
self.assertEquals(len(details), CONNS)
@@ -189,7 +189,7 @@
# The (poorly named) cache size is a target for non-ghosts.
# The cache *usually* contains non-ghosts, so that the
# size normally exceeds the target size.
-
+
#self.assertEquals(d['size'], CACHE_SIZE)
def checkDetail(self):
@@ -211,7 +211,7 @@
# deactivated before the MinPO objects.
#
# - Without the gc call, the cache will contain ghost MinPOs
- # and the check of the MinPO count below will fail. That's
+ # and the check of the MinPO count below will fail. That's
# because the counts returned by cacheDetail include ghosts.
#
# - If the mapping object containing the MinPOs isn't
@@ -219,7 +219,7 @@
# the test will fail anyway.
#
# This test really needs to be thought through and documented
- # better.
+ # better.
for klass, count in self.db.cacheDetail():
=== ZODB/src/ZODB/tests/test_cache.py 1.5 => 1.6 ===
--- ZODB/src/ZODB/tests/test_cache.py:1.5 Fri Apr 16 11:58:11 2004
+++ ZODB/src/ZODB/tests/test_cache.py Mon Apr 19 17:19:07 2004
@@ -73,7 +73,7 @@
After committing a transaction and calling cacheGC(), there
should be cache-size (4) objects in the cache. One of the
RegularObjects was deactivated.
-
+
>>> cn._cache.ringlen()
4
>>> RegularObject.deactivations
@@ -81,7 +81,7 @@
If we explicitly activate the objects again, the ringlen
should go back up to 5.
-
+
>>> for o in L:
... o._p_activate()
>>> cn._cache.ringlen()
@@ -92,7 +92,7 @@
4
>>> RegularObject.deactivations
2
-
+
>>> cn.cacheMinimize()
>>> cn._cache.ringlen()
0
@@ -102,10 +102,10 @@
If we activate all the objects again and mark one as modified,
then the one object should not be deactivated even by a
minimize.
-
+
>>> for o in L:
... o._p_activate()
- >>> o.attr = 1
+ >>> o.attr = 1
>>> cn._cache.ringlen()
5
>>> cn.cacheMinimize()
@@ -113,7 +113,7 @@
1
>>> RegularObject.deactivations
10
-
+
"""
def test_cache_gc_recalcitrant(self):
@@ -181,7 +181,7 @@
Modify three of the objects and verify that they are
deactivated when the transaction aborts.
-
+
>>> for i in range(0, 5, 2):
... L[i].attr = i
>>> [L[i]._p_state for i in range(0, 5, 2)]
=== ZODB/src/ZODB/tests/util.py 1.4 => 1.5 ===
--- ZODB/src/ZODB/tests/util.py:1.4 Fri Apr 16 11:58:11 2004
+++ ZODB/src/ZODB/tests/util.py Mon Apr 19 17:19:07 2004
@@ -36,7 +36,7 @@
db.pack(time.time()+1)
class P(persistent.Persistent):
-
+
def __init__(self, name):
self.name = name
=== ZODB/src/ZODB/tests/warnhook.py 1.1 => 1.2 ===
--- ZODB/src/ZODB/tests/warnhook.py:1.1 Thu Mar 4 11:19:35 2004
+++ ZODB/src/ZODB/tests/warnhook.py Mon Apr 19 17:19:07 2004
@@ -55,4 +55,3 @@
def clear(self):
self.warnings = []
-
More information about the Zope3-Checkins
mailing list