diff --git a/Lib/bsddb/test/test_1413192.py b/Lib/bsddb/test/test_1413192.py index 5caae81d985..1d4bd5624b1 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 @@ def __init__(self): 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: