Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 630e464

Browse files
committed
Merge 58539: squelch the warning that this test is intended to raise.
1 parent 66077d8 commit 630e464

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

Lib/bsddb/test/test_1413192.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import shutil
77
import tempfile
8+
import warnings
89
try:
910
# For Pythons w/distutils and add-on pybsddb
1011
from bsddb3 import db
@@ -32,8 +33,12 @@ def __init__(self):
3233
del self.the_txn
3334

3435

35-
context = Context()
36-
del context
36+
warnings.filterwarnings('ignore', 'DBTxn aborted in destructor')
37+
try:
38+
context = Context()
39+
del context
40+
finally:
41+
warnings.resetwarnings()
3742

3843
# try not to leave a turd
3944
try:

0 commit comments

Comments
 (0)