[CalendarServer-changes] [7469] CalendarServer/branches/users/glyph/new-export/calendarserver/tools/ test/test_export.py
source_changes at macosforge.org
source_changes at macosforge.org
Mon May 16 07:45:00 PDT 2011
Revision: 7469
http://trac.macosforge.org/projects/calendarserver/changeset/7469
Author: glyph at apple.com
Date: 2011-05-16 07:44:59 -0700 (Mon, 16 May 2011)
Log Message:
-----------
be a little more paranoid about test teardown
Modified Paths:
--------------
CalendarServer/branches/users/glyph/new-export/calendarserver/tools/test/test_export.py
Modified: CalendarServer/branches/users/glyph/new-export/calendarserver/tools/test/test_export.py
===================================================================
--- CalendarServer/branches/users/glyph/new-export/calendarserver/tools/test/test_export.py 2011-05-16 14:44:48 UTC (rev 7468)
+++ CalendarServer/branches/users/glyph/new-export/calendarserver/tools/test/test_export.py 2011-05-16 14:44:59 UTC (rev 7469)
@@ -189,10 +189,15 @@
def txn(self):
+ """
+ Create a new transaction and automatically clean it up when the test
+ completes.
+ """
aTransaction = self.store.newTransaction()
+ @inlineCallbacks
def maybeAbort():
try:
- aTransaction.abort()
+ yield aTransaction.abort()
except AlreadyFinishedError:
pass
self.addCleanup(maybeAbort)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110516/e0073660/attachment.html>
More information about the calendarserver-changes
mailing list