[Zope3-dev] Missing test cleanup in ZODB and transaction

Marius Gedminas mgedmin at b4net.lt
Sat Jan 20 13:22:32 EST 2007


There is one unit test in ZODB and two unit tests in transaction that
do not clean up after themselves fully.

Here's a patch with the missing cleanup added.  I haven't committed it
because ZODB and transaction are read-only checkouts of branches in my
Zope 3 checkout.


Index: src/ZODB/tests/testConnectionSavepoint.py
===================================================================
--- src/ZODB/tests/testConnectionSavepoint.py	(revision 71248)
+++ src/ZODB/tests/testConnectionSavepoint.py	(working copy)
@@ -83,6 +83,7 @@
     ...
     ConnectionStateError: Cannot close a connection joined to a transaction
 
+    >>> transaction.abort()
     >>> db.close()
     """
 
Index: src/transaction/tests/test_transaction.py
===================================================================
--- src/transaction/tests/test_transaction.py	(revision 71248)
+++ src/transaction/tests/test_transaction.py	(working copy)
@@ -987,6 +987,9 @@
       >>> p.name
       'julien'
 
+    Clean up:
+
+      >>> transaction.abort()
       >>> db.close()
 
     """
Index: src/transaction/tests/test_savepoint.py
===================================================================
--- src/transaction/tests/test_savepoint.py	(revision 71248)
+++ src/transaction/tests/test_savepoint.py	(working copy)
@@ -56,6 +56,11 @@
     >>> 'name' in dm2
     False
 
+Clean up:
+
+    >>> import transaction
+    >>> transaction.abort()
+
 """
 
 def test_suite():


Cheers,
Marius Gedminas
-- 
I'm a sorceress, not a miracle worker.
	-- The Spellsong War by L. E. Modesitt, Jr.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.zope.org/pipermail/zope3-dev/attachments/20070120/ed4c9e42/attachment.bin


More information about the Zope3-dev mailing list