jw-pkg/test/unit/python/jw/pkg/lib/Package
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jan Lindemann afbdc2e4b0
lib.Package: Add and fill version field
Add a version field to the Package class and make query_packages() fill it.
It's very much distribution and package dependent what shape that version
has, so from Package's perspective, it's just a str-typed member.

Further improvements and fixes:

- Make query_packages() accept throw, defaulting to the previous behaviour,
  so a caller that wants to be prepared for a missing package / an empty
  result can pass throw = False.
- Make dpkg's _run() and run_dpkg_query() forward ec and the remaining
  keyword arguments on the sudo path, which dropped them before.

Add unit tests for the file type tree and its StatResult predicates.

Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v1.4.0
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-10-28 20:14:55 +01:00
..
Makefile lib.Package: Add unit tests 2026-09-14 20:52:59 +02:00
test.py lib.Package: Add and fill version field 2026-10-28 20:14:55 +01:00