You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tests for update_changes.py: the 90-day cutoff, same-day merges, unknown cells and new targets #116
scripts/update_changes.py writes data/changes.json, which the home page, the campaign pages (their Done lists) and #109's drops all build on. Its tests (in tests/test_bundled.py) cover diff() around bundled and the wheelgap switchover. Several rules in its docstring have no test:
entries older than 90 days are dropped (KEEP_DAYS, the cutoff in update());
a wheel lost and regained in two scans on the same day is no change at all (merge() keeps only cells whose first from and last to still count);
a cell that was or is unknown doesn't count, either way;
targets only in one of the two scans are skipped. This matters whenever the scan adds targets, as it did for 3.15 and 3.15t: a new target must not show up as hundreds of gained wheels;
packages only in one scan (entering or leaving the top 5,000) are skipped;
no previous.json records nothing and returns the reason.
What to do
Add a tests/test_update_changes.py (unittest, offline, like the others) with one test per rule above. Reuse the scan() and package() helpers' style from tests/test_bundled.py.
For the cutoff, write a changes.json with an entry 90 days old and one 89 days old, and check which stay.
No change to the script unless a test finds a bug. If one does, say so in the PR.
Activity
test: cover change-history boundaries and scan transitions (wheelgap#116
AdityaSreevatsaK commentedon Nov 17, 2026
Hello @patrickballard,
I've raised PR #137 addressing this issue.
Added nine offline regression tests covering the 90-day cutoff, same-day reversals, unknown statuses, target changes and missing scan data.
All fork CI checks passed.
test: cover daily wheel-change history edge cases (#116) (#137)