Repository navigation
test: compare JSONDataRecorder data as a list in the plain array test - #4157
Merged
Merged
Conversation
|
Performance benchmarks:
|
quaquel
approved these changes
Nov 20, 2026
EwoutH
pushed a commit
to EwoutH/mesa
that referenced
this pull request
Nov 22, 2026
…mesa#4157) JSONDataRecorder.data now holds a bounded deque per dataset (mesa#4072), while the test added in mesa#4061 compares it to a list, so main fails test_json_recorder_stores_a_plain_array_as_a_list. Convert to a list before comparing. (cherry picked from commit e89f241)
EwoutH
added a commit
to EwoutH/mesa
that referenced
this pull request
Nov 22, 2026
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.
Pre-PR Checklist
Summary
maincurrently failstests/experimental/test_datarecorder.py::test_json_recorder_stores_a_plain_array_as_a_list, which turns every build and the coverage job red for all open PRs.Bug / Issue
Two merged PRs collided:
JSONDataRecorder.data[...]a boundeddeque, sowindow_sizeis honoured.test_json_recorder_stores_a_plain_array_as_a_list, which compares that data to a plain list.deque([...]) == [...]isFalse, so the assertion fails:The
buildrun on the merge commit of #4061 failed for this reason. I found no existing PR or issue for it.Implementation
Test-only change: convert the stored snapshots to a list before comparing,
list(recorder.data["custom_data"]) == [...]. The recorder code is unchanged, and the other tests in the file already treatdataas a deque or iterate over it.Testing
The test passes with this change and fails on
main. The rest of the test suite passes locally (excluding the Playwright browser tests) andruffis clean.Additional Notes
None.