Repository navigation
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.
json_params_matcher currently accepts {"enabled": 1} when the expectation is {"enabled": true}, and likewise equates false with 0. Python's bool/int equality leaks into JSON object and array comparison, so an incorrect request can satisfy a mock.
Compare JSON values recursively, distinguishing booleans from numbers while preserving equality between numeric 1 and 1.0. This applies to strict and partial dictionary matches, nested objects, and arrays. Add 12 mismatch regressions plus five equality controls.
Validation on Python 3.12.14 / requests 2.34.2: regression before fix: 12 failed, 5 passed. After fix: all 81 matcher tests and all 278 tests in responses/tests pass (18 deprecation warnings). Black and Flake8 pass. Mypy reports the same three pre-existing errors in fragment_identifier_matcher/test_recorder on unchanged source; no new type errors. git diff --check passes.