sqlite-utils/tests
Parker Gurney 816028b169 Add Database(json_default=, json_object_hook=) for custom JSON encoding/decoding
Values not natively serializable (set, enum.Enum, project-specific types)
previously always fell back to repr() when written to a JSON column, with
no way to reconstruct them on read. json_default is passed through to
json.dumps() as default= wherever the library serializes dict/list/tuple
values; json_object_hook is passed through to json.loads() as object_hook=
when deserialize_json=True. Both are Database-level, matching the existing
deserialize_json option, since every write/read path already threads
through self.db.

Fixes #521
2026-08-05 14:35:25 -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 Auto-decode columns declared as JSON in output modes (issue #579) 2026-08-05 14:19:51 -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 Add --extract option to insert/upsert commands 2026-08-05 14:23:01 -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 Auto-decode columns declared as JSON in output modes (issue #579) 2026-08-05 14:19:51 -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 Add Database(json_default=, json_object_hook=) for custom JSON encoding/decoding 2026-08-05 14:35:25 -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 insert-files: add --convert/--import to transform rows during import 2026-08-05 14:15:20 -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 Fix dishonest progress accounting for multi-byte encoded CSV input (#439) 2026-08-05 14:18:34 -07:00
test_wal.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00