Skip to content

test: move the ADR scanner's self-tests out of the file consumers fetch - #122

Merged
lesnik512 merged 1 commit into
mainfrom
split-adr-scanner-tests
Sep 27, 2026
Merged

lesnik512 merged 1 commit into
mainfrom
split-adr-scanner-tests

Conversation

@lesnik512

Copy link
Copy Markdown
Member

What

tests/test_adr_citations.py, the file every repo fetches under CI9, keeps the scanner and the one invariant. Its eight tmp_path self-tests move to tests/test_adr_scanner.py, which imports the scanner from the fetched file. The three constants the self-tests use lose their leading underscore, since they are now imported across modules.

Nothing changes outside this repo: same URL, same recipe, same bytes-for-bytes rule in CI9.

Why

Consumers ran nine tests per repo of which one said anything about that repo. The self-tests exist to prove the scanner works; that proof belongs where the file is edited, and this repo still runs all nine on every change. The bytes a consumer runs are the bytes this repo's suite exercised.

Verified

  • This repo: 134 passed, 29 skipped; the two files collect 1 + 8.
  • Fetched file alone, --rootdir=. --noconftest -o addopts=, against eof-fixer and that-depends: 1 passed each; with a planted docs/adr/0009-nope.md citation: fails naming the file and the citation.
  • ruff check --select F clean on both files.

@lesnik512
lesnik512 merged commit ba33c5b into main Sep 27, 2026
3 checks passed
@lesnik512
lesnik512 deleted the split-adr-scanner-tests branch September 27, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant