mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-12 19:44:13 +02:00
WIP new upsert implementation, refs #652
This commit is contained in:
parent
55047db798
commit
fe3a3d4000
4 changed files with 195 additions and 112 deletions
|
|
@ -1117,9 +1117,8 @@ def test_upsert_alter(db_path, tmpdir):
|
|||
)
|
||||
assert result.exit_code == 1
|
||||
assert (
|
||||
"Error: no such column: age\n\n"
|
||||
"sql = UPDATE [dogs] SET [age] = ? WHERE [id] = ?\n"
|
||||
"parameters = [5, 1]"
|
||||
"Error: table dogs has no column named age\n\n"
|
||||
"Try using --alter to add additional columns"
|
||||
) == result.output.strip()
|
||||
# Should succeed with --alter
|
||||
result = CliRunner().invoke(
|
||||
|
|
@ -2248,7 +2247,7 @@ def test_integer_overflow_error(tmpdir):
|
|||
assert result.exit_code == 1
|
||||
assert result.output == (
|
||||
"Error: Python int too large to convert to SQLite INTEGER\n\n"
|
||||
"sql = INSERT INTO [items] ([bignumber]) VALUES (?);\n"
|
||||
"sql = INSERT INTO [items] ([bignumber]) VALUES (?)\n"
|
||||
"parameters = [34223049823094832094802398430298048240]\n"
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue