mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #27190: Raise NotSupportedError if sqlite3 is older than 3.3.1
Patch by Dave Sawyer.
This commit is contained in:
parent
c415440faa
commit
7bea2347c7
3 changed files with 13 additions and 0 deletions
|
@ -180,6 +180,12 @@ class ConnectionTests(unittest.TestCase):
|
|||
with self.assertRaises(sqlite.OperationalError):
|
||||
cx.execute('insert into test(id) values(1)')
|
||||
|
||||
def CheckSameThreadErrorOnOldVersion(self):
|
||||
if sqlite.sqlite_version_info >= (3, 3, 1):
|
||||
self.skipTest('test needs sqlite3 versions older than 3.3.1')
|
||||
with self.assertRaises(sqlite.NotSupportedError) as cm:
|
||||
sqlite.connect(':memory:', check_same_thread=False)
|
||||
self.assertEqual(str(cm.exception), 'shared connections not available')
|
||||
|
||||
class CursorTests(unittest.TestCase):
|
||||
def setUp(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue