From: Gregory P. Smith Date: Fri, 19 Oct 2007 07:35:22 +0000 (+0000) Subject: Backport 58539: squelch the warning that this test is intended to raise. X-Git-Tag: v2.5.2c1~157 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dd4b025ad8366cc3978f05063e4e6491c701be77;p=thirdparty%2FPython%2Fcpython.git Backport 58539: squelch the warning that this test is intended to raise. --- diff --git a/Lib/bsddb/test/test_1413192.py b/Lib/bsddb/test/test_1413192.py index bc0ede6d2833..e8e73a160da1 100644 --- a/Lib/bsddb/test/test_1413192.py +++ b/Lib/bsddb/test/test_1413192.py @@ -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: