Test: write the snapshot revision file with a real newline escape

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-23 12:32:53 +02:00
commit 94e08d1fdc

View file

@ -77,8 +77,7 @@ class SnapshotPath(unittest.TestCase):
with tempfile.TemporaryDirectory() as home:
repo = Path(home) / "hub" / "models--org--name"
(repo / "refs").mkdir(parents=True)
(repo / "refs" / "main").write_text("deadbeef
")
(repo / "refs" / "main").write_text("deadbeef" + chr(10))
(repo / "snapshots" / "deadbeef").mkdir(parents=True)
self.assertEqual(te.snapshot_path(Path(home), "org/name"), repo / "snapshots" / "deadbeef")