Preserve exact HTTP bytes when replaying ECCV fixtures
Metadata integrity checks / metadata (push) Successful in 3m7s
Metadata integrity checks / metadata (push) Successful in 3m7s
This commit is contained in:
@@ -54,10 +54,10 @@ jobs:
|
|||||||
eccv_papers = root/'eccv2026-paper-samples'
|
eccv_papers = root/'eccv2026-paper-samples'
|
||||||
eccv_official.mkdir(); eccv_papers.mkdir()
|
eccv_official.mkdir(); eccv_papers.mkdir()
|
||||||
for name, html in eccv_fixture['official_pages'].items():
|
for name, html in eccv_fixture['official_pages'].items():
|
||||||
(eccv_official/name).write_text(html)
|
(eccv_official/name).write_bytes(html.encode('utf-8'))
|
||||||
(eccv_official/'manifest.json').write_text(eccv_fixture['official_manifest'])
|
(eccv_official/'manifest.json').write_bytes(eccv_fixture['official_manifest'].encode('utf-8'))
|
||||||
for pid, html in eccv_fixture['paper_pages'].items():
|
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']))
|
(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)
|
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())
|
eccv_report = json.loads((root/'installed-eccv2026/collection-report.json').read_text())
|
||||||
|
|||||||
BIN
Binary file not shown.
+13
-3
@@ -19,10 +19,10 @@ class ECCV2026Tests(unittest.TestCase):
|
|||||||
def snapshots(self, root):
|
def snapshots(self, root):
|
||||||
official = root/'official'; paper = root/'paper'; official.mkdir(); paper.mkdir()
|
official = root/'official'; paper = root/'paper'; official.mkdir(); paper.mkdir()
|
||||||
for name, raw in self.bundle['official_pages'].items():
|
for name, raw in self.bundle['official_pages'].items():
|
||||||
(official/name).write_text(raw)
|
(official/name).write_bytes(raw.encode('utf-8'))
|
||||||
(official/'manifest.json').write_text(self.bundle['official_manifest'])
|
(official/'manifest.json').write_bytes(self.bundle['official_manifest'].encode('utf-8'))
|
||||||
for pid, raw in self.bundle['paper_pages'].items():
|
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']))
|
(paper/'manifest.json').write_text(json.dumps(self.bundle['paper_manifest']))
|
||||||
return official, paper
|
return official, paper
|
||||||
|
|
||||||
@@ -102,3 +102,13 @@ class ECCV2026Tests(unittest.TestCase):
|
|||||||
fields = c.parse_paper(raw.replace('<p>Proactive tamper', '<p>10<sup>6</sup> Proactive tamper', 1), self.program['4048']['url'], self.program['4048'])
|
fields = c.parse_paper(raw.replace('<p>Proactive tamper', '<p>10<sup>6</sup> Proactive tamper', 1), self.program['4048']['url'], self.program['4048'])
|
||||||
self.assertIn('structured_abstract_markup_requires_review', fields['review_flags'])
|
self.assertIn('structured_abstract_markup_requires_review', fields['review_flags'])
|
||||||
self.assertEqual(fields['abstract_markup_tags'], ['sup'])
|
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'])
|
||||||
|
|||||||
Reference in New Issue
Block a user