mbox series

[wic,v2,0/9] tests: standalone test-suite framework plus the first unit test

Message ID 20260630160612.1005451-1-twoerner@gmail.com
Headers show
Series tests: standalone test-suite framework plus the first unit test | expand

Message

Trevor Woerner June 30, 2026, 4:06 p.m. UTC
v1 sent the whole test suite as a single 6000-line commit that leaned on
xfail markers to record the bugs it found. Review feedback was that this
is not reviewable: the request was for a series of small commits where
each test lands green next to the source fix that makes it pass, with no
xfails and no failing tests at any commit boundary.

This v2 is that rework. Rather than resend the entire suite at once, it
establishes the test framework and a single representative test so the
structure and conventions can be reviewed first. Later functions will
follow as their own per-function commits once this base is agreed.

The series contains:

  - the suite skeleton (pyproject test config, layout, .gitignore,
    README Testing section);
  - the conftest session banner;
  - the run-tests.sh wrapper, with optional coverage and ruff linting
    added in their own commits;
  - the suite docs (overview README and authoring guide) and the one
    ruff per-file-ignore the sys.path bootstrap needs;
  - the first unit test, tests/unit/test_bb_utils, which tests
    mkdirhier() and carries the one-line errno-import fix the test
    exposes, so the suite is green.

The whole suite is green at every commit (zero failures, zero xfails)
and tests/run-tests.sh --lint-tests is clean throughout.

Trevor Woerner (9):
  tests: add the standalone test-suite skeleton
  tests: add a session banner via conftest.py
  tests: add the run-tests.sh wrapper
  tests: add optional coverage reporting to run-tests.sh
  tests: add ruff linting to run-tests.sh
  tests/docs: add the suite overview README
  tests/docs: add the test-authoring guide
  tests: ignore E402 in the test tree for the sys.path bootstrap
  tests/unit/test_bb_utils: test mkdirhier() and fix its missing errno
    import

 .gitignore                  |  10 +++
 README.md                   |  15 ++++
 pyproject.toml              |  30 +++++++
 src/wic/bb/utils.py         |   1 +
 tests/conftest.py           |  38 +++++++++
 tests/docs/README.md        |  61 ++++++++++++++
 tests/docs/authoring.md     | 124 ++++++++++++++++++++++++++++
 tests/docs/linting.md       |  59 +++++++++++++
 tests/run-tests.sh          | 159 ++++++++++++++++++++++++++++++++++++
 tests/unit/.gitkeep         |   0
 tests/unit/test_bb_utils.py | 126 ++++++++++++++++++++++++++++
 11 files changed, 623 insertions(+)
 create mode 100644 tests/conftest.py
 create mode 100644 tests/docs/README.md
 create mode 100644 tests/docs/authoring.md
 create mode 100644 tests/docs/linting.md
 create mode 100755 tests/run-tests.sh
 create mode 100644 tests/unit/.gitkeep
 create mode 100644 tests/unit/test_bb_utils.py