[Zodb-checkins] CVS: ZODB/src/ZODB/tests - testZODB.py:1.26
Jeremy Hylton
jeremy at zope.com
Wed Apr 14 16:53:15 EDT 2004
Update of /cvs-repository/ZODB/src/ZODB/tests
In directory cvs.zope.org:/tmp/cvs-serv11171/src/ZODB/tests
Modified Files:
testZODB.py
Log Message:
Install a WarningsHook for checkLocalTransactions.
=== ZODB/src/ZODB/tests/testZODB.py 1.25 => 1.26 ===
--- ZODB/src/ZODB/tests/testZODB.py:1.25 Wed Mar 31 22:56:57 2004
+++ ZODB/src/ZODB/tests/testZODB.py Wed Apr 14 16:53:14 2004
@@ -16,6 +16,7 @@
import ZODB
import ZODB.FileStorage
from ZODB.POSException import ReadConflictError, ConflictError
+from ZODB.tests.warnhook import WarningsHook
from persistent import Persistent
from persistent.mapping import PersistentMapping
@@ -209,6 +210,8 @@
# not the thread.
conn1 = self._db.open()
conn2 = self._db.open()
+ hook = WarningsHook()
+ hook.install()
try:
conn1.setLocalTransaction()
conn2.setLocalTransaction()
@@ -238,9 +241,12 @@
conn2.sync()
self.assertEqual(r1['item'], 2)
self.assertEqual(r2['item'], 2)
+ for msg, obj, filename, lineno in hook.warnings:
+ self.assert_(msg.startswith("getTransaction() is deprecated."))
finally:
conn1.close()
conn2.close()
+ hook.uninstall()
def checkReadConflict(self):
self.obj = P()
More information about the Zodb-checkins
mailing list