Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions test-int/test_indexed_bytes_work_units.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ async def test_batch_index_reports_bytes_indexed_and_zero_for_current_file(
) -> None:
path = "notes/billing-note.md"
(project_config.home / "notes").mkdir(parents=True, exist_ok=True)
(project_config.home / path).write_text(NOTE_CONTENT, encoding="utf-8")
# newline="\n" keeps the file's bytes equal to NOTE_CONTENT on Windows too
(project_config.home / path).write_text(NOTE_CONTENT, encoding="utf-8", newline="\n")
expected_bytes = len(NOTE_CONTENT.encode("utf-8"))
runtime = await LocalProjectIndexRuntimeFactory().runtime_for_project(test_project)
# The observed checksum lets the checker compare against the index and
Expand Down Expand Up @@ -76,7 +77,7 @@ async def test_single_file_index_reports_bytes_indexed(
) -> None:
path = "notes/billing-note.md"
(project_config.home / "notes").mkdir(parents=True, exist_ok=True)
(project_config.home / path).write_text(NOTE_CONTENT, encoding="utf-8")
(project_config.home / path).write_text(NOTE_CONTENT, encoding="utf-8", newline="\n")
dependencies = await LocalProjectIndexRuntimeFactory().dependencies_for_project(test_project)

result = await dependencies.file_indexer.index_file(path, source="index")
Expand Down
Loading