fix(normalizer): defang leading LF in CSV + assert pinned workbook timestamp
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -31,6 +31,14 @@ def test_write_documents_xlsx_joins_lists(tmp_path):
|
||||
assert row["receiver_person_ids"] == "a|b"
|
||||
assert row["needs_review"] == "unparsed_date"
|
||||
|
||||
def test_write_documents_xlsx_pins_timestamp(tmp_path):
|
||||
# determinism (NFR-IDEM-01): workbook created/modified are pinned, not the current time
|
||||
doc = documents.CanonicalDocument(index="W-0001")
|
||||
out = tmp_path / "d.xlsx"
|
||||
writers.write_documents_xlsx([doc], out)
|
||||
wb = openpyxl.load_workbook(out)
|
||||
assert (wb.properties.created.year, wb.properties.created.month, wb.properties.created.day) == (2020, 1, 1)
|
||||
|
||||
def test_write_review_csv(tmp_path):
|
||||
out = tmp_path / "r.csv"
|
||||
writers.write_review_csv(out, ["raw", "count"], [["?", 3], ["x", 1]])
|
||||
|
||||
Reference in New Issue
Block a user