mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
squelch the warning that this test is supposed to trigger.
This commit is contained in:
parent
11e679e6ff
commit
87fc9ad966
1 changed files with 7 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue