Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add test
  • Loading branch information
Erlend E. Aasland committed Jun 6, 2021
commit 81fc38b6e8cf08670863a7b83f90f7be0c9bbcff
5 changes: 5 additions & 0 deletions Lib/sqlite3/test/dbapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import threading
import unittest

from test.support import check_disallow_instantiation
from test.support.os_helper import TESTFN, unlink


Expand Down Expand Up @@ -104,6 +105,10 @@ def test_shared_cache_deprecated(self):
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):

Expand Down