diff options
author | Gregory P. Smith <greg@mad-scientist.com> | 2007-10-19 07:35:22 +0000 |
---|---|---|
committer | Gregory P. Smith <greg@mad-scientist.com> | 2007-10-19 07:35:22 +0000 |
commit | dd4b025ad8366cc3978f05063e4e6491c701be77 (patch) | |
tree | 86f2f3d446614e5d601ab57bf1e74bb35f344ec1 | |
parent | 0dcc3cc94926c76223d41a0b36f4c0792ec47089 (diff) | |
download | cpython-git-dd4b025ad8366cc3978f05063e4e6491c701be77.tar.gz |
Backport 58539: squelch the warning that this test is intended to raise.
-rw-r--r-- | Lib/bsddb/test/test_1413192.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/bsddb/test/test_1413192.py b/Lib/bsddb/test/test_1413192.py index bc0ede6d28..e8e73a160d 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: |