jw-python/test/unit/python/jw/util
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jan Lindemann 2bd1db5d90
load_yaml: Reject non-dict include targets
When jw.include specifies a target path, _merge_at_path() walks the
existing document to that path.  If an intermediate key holds a
non-dict value, that value is silently replaced by an empty dict; if
the leaf key holds a non-dict value, it is silently replaced by the
included mapping.  Both cases discard local document data without
warning, and the leaf case even inverts the documented precedence in
which local content wins over included content (which holds for the
dict-versus-dict case).

Make _merge_at_path() raise ValueError when an existing value on or
at the target path is not a mapping, and add regression tests for
both the intermediate and the leaf case.

Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.84.2
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-08-25 19:35:02 +02:00
..
load_yaml load_yaml: Reject non-dict include targets 2026-08-25 19:35:02 +02:00
stree stree.StringTree: Add unit tests 2026-08-12 23:10:12 +00:00
Makefile stree.StringTree: Add unit tests 2026-08-12 23:10:12 +00:00