diff options
Diffstat (limited to 'Lib/sqlite3')
-rw-r--r-- | Lib/sqlite3/test/dbapi.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/sqlite3/test/dbapi.py b/Lib/sqlite3/test/dbapi.py index 2924231..e8bd8c5 100644 --- a/Lib/sqlite3/test/dbapi.py +++ b/Lib/sqlite3/test/dbapi.py @@ -26,6 +26,7 @@ import sys import threading import unittest +from test.support import check_disallow_instantiation from test.support.os_helper import TESTFN, unlink from test.support import threading_helper @@ -105,6 +106,10 @@ class ModuleTests(unittest.TestCase): sqlite.enable_shared_cache(enable) self.assertIn("dbapi.py", cm.filename) + def test_disallow_instantiation(self): + cx = sqlite.connect(":memory:") + check_disallow_instantiation(self, type(cx("select 1"))) + class ConnectionTests(unittest.TestCase): |