Repository navigation
test(tests): drop repeated dry-run guards and twin cases - #5138
Merged
Merged
Conversation
The root --dry-run is tested once, on a table of argv shapes through a stub command, in place of a run of each request-plan command under the root flag. The gaps tests whose list is within their class table go, because the ratchet keeps each classified command out of the gaps file. The subprocess, DNS and per-file network blocks go, because the floor refuses them; one fixture, refuse_requests, refuses a request that a fake would answer. Seven files check their dry-run classes with one helper, misclassified. Closes #4731
Owner
Author
MeasurementsThe family is
Rounds (user + sys / wall): base 148.3 / 45.5, 146.2 / 43.1, 133.8 / 40.1; change 102.3 / 31.9, 114.1 / 36.0, 109.6 / 34.4. Command of the duplicate share: Evidence
Checks run locally
This is a test-only change, not a fix, so it has no |
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.
The dry-run tests ran each request-plan command a second time under the root
--dry-run, checked the gaps file again in 14 files, and copied blocks for programs, DNS and hosts that the floor of the suite already refuses.The root
--dry-runis now tested once, intests/commands/test_global_dry_run.py, on a table of argv shapes through a stub command: options with values, positionals,--, a nested group and a flag given twice. The ratchet keeps each classified command out of the gaps file, so the 14 copies of that check go, and the prefix rule of the review commands stays. One fixture,refuse_requests, is the network block of dry runs: it also refuses a request that a fake would answer. Seven files check their dry-run classes with one helper,misclassified.docs/TESTING.mdstates the pattern.Closes #4731
Change:
openspec/changes/archive/2026-11-12-4731-drop-repeated-guards-and-twin-cases/