Skip to content

make tests survive a release - #223

Merged
vagenas merged 3 commits into
mainfrom
retarget-step-imports
Oct 30, 2026
Merged

vagenas merged 3 commits into
mainfrom
retarget-step-imports

Conversation

@vagenas

@vagenas vagenas commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

A release broke tests that would break again at every release (186 tests for 0.9), for two reasons. This makes the tests survive a release unchanged.

  • Development step imports: at release, from_next.py and to_next.py are renamed to the numbered steps (e.g. v0_9_to_0_8.py) and replaced by empty ones, so tests importing them by their development names lost their rules. utils/rotate_migration_steps.py now also retargets the tests importing a development step (from doclang.migration._steps import to_next) to the released step. Other mentions, e.g. of the step files by name, are left alone. New test in tests/test_prepare_release.py.
  • Hardcoded versions: five tests in tests/test_migration.py and tests/test_validation.py took 0.8 as the newest released version and 0.9 as the head. They now compute the newest released version and the next one.

Checked by simulating the 0.9.0 release (version sync, step rotation, schema snapshot) on this branch: all tests pass, with the 6 skips expected right after a release.

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
@vagenas vagenas changed the title retarget tests to released migration steps make tests survive a release Oct 30, 2026
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
@vagenas vagenas mentioned this pull request Oct 30, 2026
4 of 6 tasks
@vagenas
vagenas merged commit ed6c327 into main Oct 30, 2026
10 checks passed
@vagenas
vagenas deleted the retarget-step-imports branch October 30, 2026 12:42
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.

2 participants