[PLT-0] Fix test expectations for updated test assets#2062
Merged
Conversation
Follow-up to the test-asset repath (#2055). The new hosted assets differ from the deleted originals, so several tests need their fixtures/expected values realigned: - image_url: point at a stable, byte-stable JPEG (potato.jpeg) instead of picsum.photos, which returns a random image per request and broke every byte-equality assertion in test_data_rows.py. This also restores test_multiple_chunks (the shorter picsum URL under-filled the mocked 300-byte upsert chunks, yielding 7 upload calls instead of 11). - Same picsum -> stable JPEG swap in the alignerr conftest (latent; no byte-equality asserts there, but removes the third-party dependency). - Text TextEntity token updated to match sample-text.txt at offsets 112-128. - Document entity token IDs/groupId/text and page width (594) updated to match sample-pdf-textlayer.json / test-pdf.pdf. - Video frame_rate/frame_count updated to test_video_500kb.mp4 (25 fps, 627). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mrobers1982
requested review from
ChuckTerry,
KeshavSahoo,
RainIwakura,
Tim-Kerr,
cyrusj89,
lgluszek and
ramy1951
July 9, 2026 22:43
CI installs deps via `rye sync -f --update-all`, which ignores the lockfile and resolves `pytest>=8.1.1` to pytest 9.1.1. pytest 9 changed the internal IdMaker signature, which pytest-cases (<=3.10.1) still calls the old way at import time, raising `TypeError: IdMaker.__init__() takes 7 positional arguments but 8 were given` and breaking collection in every test job. Cap pytest <9 in the root and alignerr dev-dependencies until pytest-cases ships pytest 9 support. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
project.py, test_batch.py, and test_project.py (last touched by #2060) were not formatted per the repo's ruff config, failing `rye fmt --check` on every PR. Formatted with ruff 0.8.2 (the version bundled by CI's rye 0.43.0). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
itssujan
approved these changes
Jul 10, 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.
Description
Follow-up to #2055 (test-asset repath). The new hosted assets differ from the deleted originals, so several tests needed their fixtures/expected values realigned.
Changes
Bucket 1 —
image_urlbyte-equality failuresimage_urlpointed athttps://picsum.photos/200/300.jpg, which returns a different random image per request, breaking everyrequests.get(image_url).content == requests.get(data_row.row_data).contentassertion intest_data_rows.py. Repointed to a stable, byte-stable JPEG (potato.jpeg).test_data_rows_upsert.py::test_multiple_chunks(assert 7 == 11): the shorter picsum URL under-filled the mocked 300-byte upsert chunks. Verified by reproducing the chunker locally — potato URL yields 11 upload calls, matching the assertion.lbox-alignerr/tests/conftest.py(latent there — no byte-equality asserts — but removes the third-party dependency).Bucket 2 — expected values for new asset content
TextEntitytoken updated to matchsample-text.txtat offsets 112–128 (server extractstext[start:end+1]).groupId/textre-derived from the newsample-pdf-textlayer.json, and pagewidthupdated612 → 594(newtest-pdf.pdfMediaBox).frame_rate 10 → 25,frame_count 100 → 627(intrinsic totest_video_500kb.mp4, verified via ffprobe).Notes / not in scope
The following pre-date this change and reproduce on
develop(backend/staging, not asset-related), so they are intentionally not addressed here:test_bulk_assign_data_rows*—project_based_userfixture uses the removedaddMembersToOrganizationmutation.test_get_slice— shared-org state-leak flakiness.Verification
Test-only changes. Text/Document values are read directly from the new asset files (deterministic). The video
frame_count = 627and all server-rehost byte-equality checks can only be fully confirmed by the integration job running against staging.🤖 Generated with Claude Code
Note
Low Risk
Test-only and dependency-pin changes; no production SDK logic beyond cosmetic formatting in
project.py.Overview
Follow-up to test-asset repathing: integration and export tests are updated so fixtures and assertions match the new hosted files, not the removed originals.
Stable image URL:
IMG_URLinlibs/labelboxandlbox-alignerrconftest switches from picsum.photos to a fixed GCS JPEG (potato.jpeg), with comments explaining byte-equality and upsert chunk-count tests that depended on a non-random source.Annotation import expectations: Text entity token, document token IDs /
groupId/ selected text, and PDF page width (612→594) are refreshed forsample-text.txt,sample-pdf-textlayer.json, andtest-pdf.pdf.Video streamable export: Expected
frame_rate(10→25) andframe_count(100→627) fortest_video_500kb.mp4.Dev deps: Root and
lbox-alignerrpytestcapped to<9untilpytest-casessupports pytest 9.Minor formatting-only edits in
project.get_overview, batch overview integration test, and unit tests—no API behavior change.Reviewed by Cursor Bugbot for commit c778ba7. Bugbot is set up for automated code reviews on this repo. Configure here.