Skip to content

Commit f82dfc0

Browse files
committed
test: preserve asset fixture line endings
Write the hashed chat-template fixture as exact UTF-8 bytes so Windows newline translation does not invalidate its expected SHA-256. Co-authored-by: Copilot <[email protected]> Copilot-Session: e10674c1-6909-4b09-9f5a-d41b28c89d2d
1 parent 5cf1749 commit f82dfc0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/mobius/upstream_patches/_patches_test.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def setUp(self):
6565
self.addCleanup(self._temp.cleanup)
6666

6767
def _write_package(self, template: str = _ORIGINAL, *, tokenizer_config=True):
68-
(self.package / "chat_template.jinja").write_text(template, encoding="utf-8")
68+
(self.package / "chat_template.jinja").write_bytes(template.encode("utf-8"))
6969
if tokenizer_config:
7070
(self.package / "tokenizer_config.json").write_text(
7171
json.dumps({"chat_template": template, "model_max_length": 4096}),

0 commit comments

Comments
 (0)