summaryrefslogtreecommitdiffstats
path: root/Lib/sqlite3/test/transactions.py
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2016-06-14 11:19:02 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2016-06-14 11:19:02 (GMT)
commitf85bce74db9198498f394cf3b12e3c9edab9fc09 (patch)
tree66d58eb4f185c3cb819ef52f031e278e9d331b52 /Lib/sqlite3/test/transactions.py
parent2b50899a28c6fa860f4654224dbdf60c47c72821 (diff)
downloadcpython-f85bce74db9198498f394cf3b12e3c9edab9fc09.zip
cpython-f85bce74db9198498f394cf3b12e3c9edab9fc09.tar.gz
cpython-f85bce74db9198498f394cf3b12e3c9edab9fc09.tar.bz2
Mark tests as skipped when a SQLite version is not supported
Diffstat (limited to 'Lib/sqlite3/test/transactions.py')
-rw-r--r--Lib/sqlite3/test/transactions.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/Lib/sqlite3/test/transactions.py b/Lib/sqlite3/test/transactions.py
index eae26c4..a25360a 100644
--- a/Lib/sqlite3/test/transactions.py
+++ b/Lib/sqlite3/test/transactions.py
@@ -111,25 +111,21 @@ class TransactionTests(unittest.TestCase):
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):