mirror of
https://github.com/python/cpython.git
synced 2025-10-27 19:54:38 +00:00
Mark tests as skipped when a SQLite version is not supported
This commit is contained in:
parent
2b50899a28
commit
f85bce74db
4 changed files with 9 additions and 16 deletions
|
|
@ -111,25 +111,21 @@ def CheckToggleAutoCommit(self):
|
|||
res = self.cur2.fetchall()
|
||||
self.assertEqual(len(res), 1)
|
||||
|
||||
@unittest.skipIf(sqlite.sqlite_version_info < (3, 2, 2),
|
||||
'test hangs on sqlite versions older than 3.2.2')
|
||||
def CheckRaiseTimeout(self):
|
||||
if sqlite.sqlite_version_info < (3, 2, 2):
|
||||
# This will fail (hang) on earlier versions of sqlite.
|
||||
# Determine exact version it was fixed. 3.2.1 hangs.
|
||||
return
|
||||
self.cur1.execute("create table test(i)")
|
||||
self.cur1.execute("insert into test(i) values (5)")
|
||||
with self.assertRaises(sqlite.OperationalError):
|
||||
self.cur2.execute("insert into test(i) values (5)")
|
||||
|
||||
@unittest.skipIf(sqlite.sqlite_version_info < (3, 2, 2),
|
||||
'test hangs on sqlite versions older than 3.2.2')
|
||||
def CheckLocking(self):
|
||||
"""
|
||||
This tests the improved concurrency with pysqlite 2.3.4. You needed
|
||||
to roll back con2 before you could commit con1.
|
||||
"""
|
||||
if sqlite.sqlite_version_info < (3, 2, 2):
|
||||
# This will fail (hang) on earlier versions of sqlite.
|
||||
# Determine exact version it was fixed. 3.2.1 hangs.
|
||||
return
|
||||
self.cur1.execute("create table test(i)")
|
||||
self.cur1.execute("insert into test(i) values (5)")
|
||||
with self.assertRaises(sqlite.OperationalError):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue