sqlite-utils/tests
ikatyal2110 6a456830ca
Fix _decode_default_value to unescape doubled single quotes in string defaults (#811)
* Fix _decode_default_value to unescape doubled single quotes in string defaults

SQLite stores string defaults with single quotes doubled (e.g. DEFAULT 'O''Brien'
is stored as the literal "'O''Brien'" in sqlite_master). The previous code
stripped the outer quotes with value[1:-1] but never converted '' back to ',
so default_values returned the raw escaped form instead of the true string value.

* Test for doubled single quotes in string defaults
2026-07-25 21:52:04 -07:00
..
sniff sqlite-utils insert --sniff option, closes #230 2021-02-14 11:23:12 -08:00
__init__.py Initial project layout + database table creation tools 2018-07-28 06:46:17 -07:00
conftest.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
ext.c Support entrypoints for --load-extension (#473) 2022-08-26 22:55:47 -07:00
test_analyze.py Use sqlean if available in environment (#560) 2023-06-25 16:25:51 -07:00
test_analyze_tables.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_atomic.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_attach.py db.attach(alias, filepath) method, closes #113 2021-02-18 20:56:32 -08:00
test_cli.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_cli_bulk.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_cli_convert.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_cli_insert.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_cli_memory.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_cli_migrate.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_column_affinity.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_column_casing.py Match column names case-insensitively, closes #760 2026-07-05 22:11:22 -07:00
test_constructor.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_conversions.py Now complies with flake8, refs #291 2021-06-22 18:22:08 -07:00
test_convert.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_create.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_create_view.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_default_value.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_delete.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_docs.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_duplicate.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_enable_counts.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_extract.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_extracts.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_foreign_keys.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_fts.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_get.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_gis.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_hypothesis.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_insert_files.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_introspect.py Fix _decode_default_value to unescape doubled single quotes in string defaults (#811) 2026-07-25 21:52:04 -07:00
test_list_mode.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_lookup.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_m2m.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_migrations.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_plugins.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_query.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_recipes.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_recreate.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_register_function.py Database as a context manager, fixed many pytest warnings 2025-12-11 16:56:12 -08:00
test_rows.py Fix two tests that assumed modern SQLite behavior 2026-07-06 22:02:41 -07:00
test_rows_from_file.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_sniff.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_suggest_column_types.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_tracer.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_transform.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_update.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_upsert.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_utils.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_wal.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00