mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-45754: Use correct SQLite limit when checking statement length (GH-29489)
This commit is contained in:
parent
4cdeee5978
commit
c1323d4b8c
5 changed files with 14 additions and 11 deletions
|
@ -362,11 +362,11 @@ class RegressionTests(unittest.TestCase):
|
|||
with memory_database() as cx, cx_limit(cx) as lim:
|
||||
cu = cx.cursor()
|
||||
|
||||
cx("select 1".ljust(lim-1))
|
||||
cx("select 1".ljust(lim))
|
||||
# use a different SQL statement; don't reuse from the LRU cache
|
||||
cu.execute("select 2".ljust(lim-1))
|
||||
cu.execute("select 2".ljust(lim))
|
||||
|
||||
sql = "select 3".ljust(lim)
|
||||
sql = "select 3".ljust(lim+1)
|
||||
self.assertRaisesRegex(sqlite.DataError, msg, cx, sql)
|
||||
self.assertRaisesRegex(sqlite.DataError, msg, cu.execute, sql)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue