test: cover config migration dry run#10891
Conversation
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The dry-run tests hard-code the full
io.fetch_output()string including spacing and newlines, which may be brittle; consider normalizing (e.g., using.strip()or checking substrings) so minor formatting changes don't unnecessarily break the tests. - The four
dry_runtests share a lot of setup and follow the same pattern; you could reduce duplication and make future changes easier by parametrizing them (e.g., expected return value and expected output per migration scenario).
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The dry-run tests hard-code the full `io.fetch_output()` string including spacing and newlines, which may be brittle; consider normalizing (e.g., using `.strip()` or checking substrings) so minor formatting changes don't unnecessarily break the tests.
- The four `dry_run` tests share a lot of setup and follow the same pattern; you could reduce duplication and make future changes easier by parametrizing them (e.g., expected return value and expected output per migration scenario).Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
Thanks for the review. I pushed Local checks I reran:
The earlier Ubuntu 3.10 pytest failure looks unrelated to this diff ( |
|
CI follow-up: the remaining Windows failure appears unrelated to this PR. The failing test is I tried rerunning the failed job, but GitHub rejected it because I do not have admin rights on the repository. |
bd622ac to
299c093
Compare
Summary
ConfigSourceMigration.dry_run()outputTests
.venv/bin/ruff format tests/config/test_config_source.py.venv/bin/ruff check tests/config/test_config_source.py.venv/bin/python -m pytest tests/config/test_config_source.py -n 0Relates-to: #3155