We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8cdb980 commit d68d6d8Copy full SHA for d68d6d8
Lib/test/test_sqlite3/test_dbapi.py
@@ -540,6 +540,13 @@ def __getitem__(slf, x):
540
with self.assertRaises(ZeroDivisionError):
541
self.cu.execute("select name from test where name=?", L())
542
543
+ def test_execute_too_many_params(self):
544
+ category = sqlite.SQLITE_LIMIT_VARIABLE_NUMBER
545
+ msg = "too many SQL variables"
546
+ with cx_limit(self.cx, category=category, limit=1):
547
+ with self.assertRaisesRegex(sqlite.OperationalError, msg):
548
+ self.cu.execute("insert into test values(?, ?)", (1, 2))
549
+
550
def test_execute_dict_mapping(self):
551
self.cu.execute("insert into test(name) values ('foo')")
552
self.cu.execute("select name from test where name=:name", {"name": "foo"})
0 commit comments