]> granicus.if.org Git - python/commitdiff
Merge 58539: squelch the warning that this test is intended to raise.
authorGregory P. Smith <greg@mad-scientist.com>
Fri, 19 Oct 2007 07:34:48 +0000 (07:34 +0000)
committerGregory P. Smith <greg@mad-scientist.com>
Fri, 19 Oct 2007 07:34:48 +0000 (07:34 +0000)
Lib/bsddb/test/test_1413192.py

index 5caae81d98594b8fd552177f09ce2c1a0353125c..1d4bd5624b13ab991cf5ee0d889e6b748bd83ac2 100644 (file)
@@ -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 @@ class Context:
         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: