bpo-37406: sqlite3 raises TypeError for wrong operation type (GH-14386)

The sqlite3 module now raises TypeError, rather than ValueError, if
operation argument type is not str: execute(), executemany() and
calling a connection.
This commit is contained in:
Victor Stinner 2019-06-26 03:16:24 +02:00 committed by GitHub
parent ed076ed467
commit c6a2320e87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 16 deletions

View file

@ -261,7 +261,7 @@ class RegressionTests(unittest.TestCase):
Call a connection with a non-string SQL request: check error handling
of the statement constructor.
"""
self.assertRaises(sqlite.Warning, self.con, 1)
self.assertRaises(TypeError, self.con, 1)
def CheckCollation(self):
def collation_cb(a, b):