bpo-24464: Deprecate sqlite3.enable_shared_cache (GH-24008)

This commit is contained in:
Erlend Egeberg Aasland 2021-01-06 01:36:04 +01:00 committed by GitHub
parent f9949f82e1
commit ddb5e11683
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 32 additions and 0 deletions

View file

@ -83,6 +83,13 @@ class ModuleTests(unittest.TestCase):
sqlite.DatabaseError),
"NotSupportedError is not a subclass of DatabaseError")
def CheckSharedCacheDeprecated(self):
for enable in (True, False):
with self.assertWarns(DeprecationWarning) as cm:
sqlite.enable_shared_cache(enable)
self.assertIn("dbapi.py", cm.filename)
class ConnectionTests(unittest.TestCase):
def setUp(self):