test: move the ADR scanner's self-tests out of the file consumers fetch - #122
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
tests/test_adr_citations.py, the file every repo fetches under CI9, keeps the scanner and the one invariant. Its eighttmp_pathself-tests move totests/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
--rootdir=. --noconftest -o addopts=, against eof-fixer and that-depends: 1 passed each; with a planteddocs/adr/0009-nope.mdcitation: fails naming the file and the citation.ruff check --select Fclean on both files.