test_integration.py: generated SQL test needs CREATE TABLE to validate #149

Closed
opened 2026-07-06 07:07:41 +00:00 by the.auditor · 0 comments
Owner

tests/test_integration.py:121-141test_generated_sql_is_valid_sqlite3 runs sqlite3 :memory: .read on generated SQL, but there's no CREATE TABLE action (...) statement. The INSERT will fail with "no such table: action" if sqlite3 is installed.

The test is silently skipped on systems without sqlite3, only manifesting as a failure when sqlite3 IS present.

Fix: either create the table in the SQL before validating, or add a CREATE TABLE statement to the generated SQL being tested.

Ref: PR #148

`tests/test_integration.py:121-141` — `test_generated_sql_is_valid_sqlite3` runs `sqlite3 :memory: .read` on generated SQL, but there's no `CREATE TABLE action (...)` statement. The INSERT will fail with "no such table: action" if sqlite3 is installed. The test is silently skipped on systems without sqlite3, only manifesting as a failure when sqlite3 IS present. Fix: either create the table in the SQL before validating, or add a CREATE TABLE statement to the generated SQL being tested. Ref: PR #148
fuzzy closed this issue 2026-07-06 09:18:33 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
thwap/hottea#149
No description provided.