test: establish offline HTTP adapter contract - #253
Merged
Conversation
Separate mocked HTTP adapter characterization from live MLB API tests. Add deterministic requests-mock coverage and strict xfail markers for known defects that fix/http-adapter-correctness will address. Co-authored-by: Matthew Spah <spahmatthew@gmail.com>
Mattsface
marked this pull request as ready for review
August 1, 2026 05:08
Co-authored-by: Matthew Spah <spahmatthew@gmail.com>
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.
Summary
Establishes deterministic offline characterization tests for
MlbDataAdapterandMlbResultbefore the HTTP transport refactor in 0.8.0.Mocked HTTP coverage moves out of
tests/external_tests/. Live MLB API tests remain external-only. Known defects are locked in with strictxfailmarkers so a future fix surfaces as XPASS until the markers are removed.Why
PR 1 of the 0.8.0 HTTP reliability release. Document current adapter behavior without changing production code.
What changed
tests/test_mlb_dataadapter.py(requests-mock characterization + 2 strict xfails)tests/test_mlb_result.py(MlbResultconstructor behavior + 2 strict xfails)tests/external_tests/mlbdataadapter/test_mlbadapter.pyto live API tests onlyresult.data is payloadso a future copy-on-construct fix can preserve caller-owned dataWhat did not change
mlb_dataadapter.py,exceptions.py,__init__.pyuntouched)How tested
Risk
Low. Test-only change. Strict xfails intentionally fail the suite on XPASS after adapter-correctness fixes until markers are removed.
Intentionally left out
fix/http-adapter-correctness)