Repository navigation
test(core): write the indexed-bytes test note with LF newlines - #1674
Closed
cristianchiriac wants to merge 1 commit into
Closed
cristianchiriac wants to merge 1 commit into
cristianchiriac wants to merge 1 commit into
Conversation
write_text() translates "\n" to "\r\n" on Windows, so the note on disk was 11 bytes longer than NOTE_CONTENT and both tests in test_indexed_bytes_work_units.py failed on the Windows CI job (assert 204 == 193). Write the note with newline="\n" so its bytes, size and checksum match NOTE_CONTENT on every platform. Signed-off-by: cristianchiriac <80774326+cristianchiriac@users.noreply.github.com>
|
|
Member
|
Thanks @cristianchiriac! This landed on |
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
Since #1672, the
Test SQLite Integration (windows-latest, Python 3.12)job onmainfails in the newtest-int/test_indexed_bytes_work_units.py:On Windows,
Path.write_text()translates\nto\r\n. The note on disk is therefore 11 bytes longer thanNOTE_CONTENT(one\rper line), and the indexer correctly reports those 204 bytes. The test expectslen(NOTE_CONTENT.encode("utf-8")). In the batch test, the observedchecksumandsizepassed to the checker are computed fromNOTE_CONTENTtoo, so they didn't describe the file on disk either.The fix writes the note with
newline="\n", astests/test_claude_issue_triage.pyalready does. The file's bytes, size and checksum then matchNOTE_CONTENTon every platform. Only the test changes.Testing
On Windows 11, Python 3.12, with
uv run --frozen pytest test-int/test_indexed_bytes_work_units.py:assert 204 == 193)ruff check,ruff format --checkandty checkare clean on the changed file. The commit is signed off for DCO.