diff --git a/.gitea/workflows/check.yml b/.gitea/workflows/check.yml index 7434887..b02e8b7 100644 --- a/.gitea/workflows/check.yml +++ b/.gitea/workflows/check.yml @@ -54,10 +54,10 @@ jobs: eccv_papers = root/'eccv2026-paper-samples' eccv_official.mkdir(); eccv_papers.mkdir() for name, html in eccv_fixture['official_pages'].items(): - (eccv_official/name).write_text(html) - (eccv_official/'manifest.json').write_text(eccv_fixture['official_manifest']) + (eccv_official/name).write_bytes(html.encode('utf-8')) + (eccv_official/'manifest.json').write_bytes(eccv_fixture['official_manifest'].encode('utf-8')) for pid, html in eccv_fixture['paper_pages'].items(): - (eccv_papers/(pid+'.html')).write_text(html) + (eccv_papers/(pid+'.html')).write_bytes(html.encode('utf-8')) (eccv_papers/'manifest.json').write_text(json.dumps(eccv_fixture['paper_manifest'])) subprocess.run([python,'-I','-B','-m','paper_atlas','collect','eccv2026-program','--official-snapshots',str(eccv_official),'--paper-snapshots',str(eccv_papers),'--out',str(root/'installed-eccv2026')],cwd=outside,check=True) eccv_report = json.loads((root/'installed-eccv2026/collection-report.json').read_text()) diff --git a/tests/fixtures/eccv2026-source.json.gz b/tests/fixtures/eccv2026-source.json.gz index 940bdf0..2f19b9f 100644 Binary files a/tests/fixtures/eccv2026-source.json.gz and b/tests/fixtures/eccv2026-source.json.gz differ diff --git a/tests/test_eccv2026.py b/tests/test_eccv2026.py index 8de5e62..099c4a7 100644 --- a/tests/test_eccv2026.py +++ b/tests/test_eccv2026.py @@ -19,10 +19,10 @@ class ECCV2026Tests(unittest.TestCase): def snapshots(self, root): official = root/'official'; paper = root/'paper'; official.mkdir(); paper.mkdir() for name, raw in self.bundle['official_pages'].items(): - (official/name).write_text(raw) - (official/'manifest.json').write_text(self.bundle['official_manifest']) + (official/name).write_bytes(raw.encode('utf-8')) + (official/'manifest.json').write_bytes(self.bundle['official_manifest'].encode('utf-8')) for pid, raw in self.bundle['paper_pages'].items(): - (paper/(pid+'.html')).write_text(raw) + (paper/(pid+'.html')).write_bytes(raw.encode('utf-8')) (paper/'manifest.json').write_text(json.dumps(self.bundle['paper_manifest'])) return official, paper @@ -102,3 +102,13 @@ class ECCV2026Tests(unittest.TestCase): fields = c.parse_paper(raw.replace('

Proactive tamper', '

106 Proactive tamper', 1), self.program['4048']['url'], self.program['4048']) self.assertIn('structured_abstract_markup_requires_review', fields['review_flags']) self.assertEqual(fields['abstract_markup_tags'], ['sup']) + + def test_fixture_preserves_exact_http_bytes_including_crlf(self): + import hashlib + for receipt in json.loads(self.bundle['official_manifest'])['sources']: + raw = self.bundle['official_pages'][receipt['file']].encode('utf-8') + self.assertEqual(len(raw), receipt['bytes']) + self.assertEqual(hashlib.sha256(raw).hexdigest(), receipt['sha256']) + for receipt in self.bundle['paper_manifest']['records']: + raw = self.bundle['paper_pages'][receipt['paper_id']].encode('utf-8') + self.assertEqual(hashlib.sha256(raw).hexdigest(), receipt['sha256'])