mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +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
|
@ -177,9 +177,9 @@ class ConnectionTests(unittest.TestCase):
|
|||
with self.assertRaises(sqlite.OperationalError):
|
||||
cx.execute('insert into test(id) values(1)')
|
||||
|
||||
@unittest.skipIf(sqlite.sqlite_version_info >= (3, 3, 1),
|
||||
'needs sqlite versions older than 3.3.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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue