test: drop no-op resolve_json monkeypatching#155
Merged
Conversation
resolve_json is now just `return explicit` (it no longer auto-enables JSON off a tty), so the monkeypatches of aai_cli.output.resolve_json across the suite were either dead no-ops (passthrough / forced-False on invocations that never pass --json) or stood in for the real flag. - Delete the redundant patches and the _human() helpers that only wrapped them. - Convert test_setup / test_setup_install's _force_json fixtures to pass the real --json flag on the structured-output invocations, exercising the genuine argscan -> json_option -> resolve_json path instead of patching the resolver. - Remove the now-unused monkeypatch fixture params left behind. - Record the convention in tests/AGENTS.md. Test-only; full gate green.
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.
resolve_json is now just
return explicit(it no longer auto-enables JSONoff a tty), so the monkeypatches of aai_cli.output.resolve_json across the
suite were either dead no-ops (passthrough / forced-False on invocations that
never pass --json) or stood in for the real flag.
real --json flag on the structured-output invocations, exercising the genuine
argscan -> json_option -> resolve_json path instead of patching the resolver.
Test-only; full gate green.