[Zope-Checkins]
SVN: Zope/trunk/lib/python/Testing/ZopeTestCase/testZODBCompat.py
Use transaction.savepoint(optimistic=True) as advised by
Florent, Tres, and Tim.
Stefan H. Holek
stefan at epy.co.at
Fri Nov 4 05:24:10 EST 2005
Log message for revision 39884:
Use transaction.savepoint(optimistic=True) as advised by Florent, Tres, and Tim.
(Sheesh, can't a guy make a little checkin in private? ;-)
Changed:
U Zope/trunk/lib/python/Testing/ZopeTestCase/testZODBCompat.py
-=-
Modified: Zope/trunk/lib/python/Testing/ZopeTestCase/testZODBCompat.py
===================================================================
--- Zope/trunk/lib/python/Testing/ZopeTestCase/testZODBCompat.py 2005-11-04 09:33:23 UTC (rev 39883)
+++ Zope/trunk/lib/python/Testing/ZopeTestCase/testZODBCompat.py 2005-11-04 10:24:10 UTC (rev 39884)
@@ -42,7 +42,7 @@
self.folder.addDTMLMethod('doc', file='foo')
# _p_oids are None until we commit a subtransaction
self.assertEqual(self.folder._p_oid, None)
- transaction.savepoint()
+ transaction.savepoint(optimistic=True)
self.failIfEqual(self.folder._p_oid, None)
def testCutPaste(self):
@@ -93,7 +93,7 @@
self.folder.addDTMLMethod('doc', file='foo')
# _p_oids are None until we commit a subtransaction
self.assertEqual(self.folder._p_oid, None)
- transaction.savepoint()
+ transaction.savepoint(optimistic=True)
self.failIfEqual(self.folder._p_oid, None)
def testExport(self):
@@ -315,7 +315,7 @@
def testSubTransactionAbort(self):
self.folder.foo = 1
self.failUnless(hasattr(self.folder, 'foo'))
- transaction.savepoint()
+ transaction.savepoint(optimistic=True)
transaction.abort()
# This time the abort nukes the foo attribute...
self.failIf(hasattr(self.folder, 'foo'))
@@ -330,7 +330,7 @@
def testSubTransactionAbortPersistent(self):
self.folder._p_foo = 1
self.failUnless(hasattr(self.folder, '_p_foo'))
- transaction.savepoint()
+ transaction.savepoint(optimistic=True)
transaction.abort()
# This time the abort nukes the _p_foo attribute...
self.failIf(hasattr(self.folder, '_p_foo'))
@@ -345,7 +345,7 @@
def testSubTransactionAbortVolatile(self):
self.folder._v_foo = 1
self.failUnless(hasattr(self.folder, '_v_foo'))
- transaction.savepoint()
+ transaction.savepoint(optimistic=True)
transaction.abort()
# This time the abort nukes the _v_foo attribute...
self.failIf(hasattr(self.folder, '_v_foo'))
More information about the Zope-Checkins
mailing list