From 25824467846ca75db3bd737cb19b5a8e0d01b1b2 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Mon, 6 Jul 2026 22:06:51 -0700 Subject: [PATCH] Skip RETURNING-based trigger test on SQLite older than 3.35 The query() exception-masking test uses INSERT ... RETURNING, which is a syntax error on SQLite 3.23.1 - skip it there like the other RETURNING tests. Refs https://github.com/simonw/sqlite-utils/issues/769#issuecomment-4900034150 Co-Authored-By: Claude Fable 5 --- tests/test_query.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_query.py b/tests/test_query.py index aac5a29..06847da 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -282,6 +282,10 @@ def test_execute_returning_dicts(fresh_db): ] +@pytest.mark.skipif( + sqlite3.sqlite_version_info < (3, 35, 0), + reason="RETURNING requires SQLite 3.35.0 or higher", +) def test_query_preserves_error_from_transaction_destroying_trigger(fresh_db): # RAISE(ROLLBACK) destroys the savepoint guard - the original # IntegrityError must propagate, not "no such savepoint"