[Python-3000-checkins] r58540 - python/branches/py3k/Lib/bsddb/test/test_1413192.py

gregory.p.smith python-3000-checkins at python.org
Fri Oct 19 09:34:49 CEST 2007


Author: gregory.p.smith
Date: Fri Oct 19 09:34:48 2007
New Revision: 58540

Modified:
   python/branches/py3k/Lib/bsddb/test/test_1413192.py
Log:
Merge 58539: squelch the warning that this test is intended to raise.


Modified: python/branches/py3k/Lib/bsddb/test/test_1413192.py
==============================================================================
--- python/branches/py3k/Lib/bsddb/test/test_1413192.py	(original)
+++ python/branches/py3k/Lib/bsddb/test/test_1413192.py	Fri Oct 19 09:34:48 2007
@@ -5,6 +5,7 @@
 
 import shutil
 import tempfile
+import warnings
 try:
     # For Pythons w/distutils and add-on pybsddb
     from bsddb3 import db
@@ -32,8 +33,12 @@
         del self.the_txn
 
 
-context = Context()
-del context
+warnings.filterwarnings('ignore', 'DBTxn aborted in destructor')
+try:
+    context = Context()
+    del context
+finally:
+    warnings.resetwarnings()
 
 # try not to leave a turd
 try:


More information about the Python-3000-checkins mailing list