mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
[3.10] bpo-44087: Disallow instantiation of sqlite3.Statement (GH-26567) (GH-26816)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
This commit is contained in:
parent
28fe0159f5
commit
ccc95c7b47
2 changed files with 6 additions and 1 deletions
|
@ -92,6 +92,11 @@ class ModuleTests(unittest.TestCase):
|
|||
sqlite.enable_shared_cache(enable)
|
||||
self.assertIn("dbapi.py", cm.filename)
|
||||
|
||||
def test_disallow_instantiation(self):
|
||||
cx = sqlite.connect(":memory:")
|
||||
tp = type(cx("select 1"))
|
||||
self.assertRaises(TypeError, tp)
|
||||
|
||||
|
||||
class ConnectionTests(unittest.TestCase):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue