jw-python/test
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jan Lindemann d5da1599ad
load_yaml: Add globbing to jw.include specs
The jw.include file spec is resolved as a single literal file name,
so a set of files under one directory has to be listed one by one.

Let the file part of a spec use glob characters (*, ?, [...]).
_normalize_include_specs() expands every match into its own
IncludeSpec entry, so matches are loaded and deep-merged in lexical
order: at the root, later files win; at a target path, the existing
content wins as with a single include.  A non-optional glob that
matches no files raises ValueError; the leading - prefix keeps a
glob optional.  Document the globbing in the module docstring,
including the YAML quoting requirement for specs that start with a
glob character, and add tests covering the glob syntax, lexical
order, the no-match and optional cases, target-path merging,
absolute paths, and self-inclusion.

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:03 +02:00
..
cast test: Fix MyPy errors 2026-08-12 23:10:12 +00:00
parse_opts test: Fix MyPy errors 2026-08-12 23:10:12 +00:00
trim_src test: Fix MyPy errors 2026-08-12 23:10:12 +00:00
unit load_yaml: Add globbing to jw.include specs 2026-08-25 19:35:03 +02:00
__init__.py 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