mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Backport 58539: squelch the warning that this test is intended to raise.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user