Python utility library
  • Python 98.5%
  • Makefile 1.3%
  • Shell 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jan Lindemann e076d5778b
test/parse_opts: Replace with Options unit test
The parse_opts test is a plain script that constructs an Options from
sys.argv and crashed on the first get() call, because the by_index
condition in Options.get() is inverted and raises KeyError for an integer
index. It has several shortcomings, though:

- "make test" doesn't execute it, only make -C test/parse_opts run, so CI
  doesn't run it
- It doesn't adhere to standard janware directory layout
- It's very basic

Replace the script with a pytest module under
test/unit/python/jw/util/Options, following the layout of the sibling
unit test directories: a Makefile including py-test.mk and a test.py
discovered by pytest. The module covers parsing of option strings, repeated
keys, JSON values, flags, get() with defaults and the by_index parameter,
__contains__, __iter__, keys(), str() and update().

Signed-off-by: Jan Lindemann <jan@janware.com>
Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.85.1
2026-09-18 09:47:35 +02:00
.github/workflows ci.yaml: enable-email-notifications: true 2026-06-08 14:55:11 +02:00
bin Rename the MODDIR makefile variable to JWBDIR 2019-06-29 23:32:20 +02:00
conf Rename the MODDIR makefile variable to JWBDIR 2019-06-29 23:32:20 +02:00
make stree.StringTree: Add unit tests 2026-08-12 23:10:12 +00:00
scripts Add missing async keywords to jwutils.Cmd.run() reimplementations 2020-02-10 19:49:46 +01:00
src Options.get(): Fix inverted by_index check 2026-09-18 09:44:26 +02:00
test test/parse_opts: Replace with Options unit test 2026-09-18 09:47:35 +02:00
.gitignore .gitignore: Update 2: Run "make gitignore" 2026-09-13 13:47:08 +02:00
HASH Release 1.0.0-56@suse-tumbleweed/x86_64 2026-09-17 05:33:20 +00:00
Makefile Makefile: Include py-topdir.mk 2026-06-12 04:55:47 +02:00
RELEASES Release 1.0.0-56@suse-tumbleweed/x86_64 2026-09-17 05:33:20 +00:00
VERSION Start version: 1.0.0-56 2026-09-16 23:12:58 +00:00