This commit is contained in:
eddiesoehnel committed 2026-10-31 14:55:34 -06:00
1 parent d94c6ebe75
commit e58e1be481
7 files changed
+59 -2

No files matched your search

+25
View File
@@ -187,5 +187,30 @@ class SiaTranscriptTests(unittest.TestCase):
self.assertFalse((root / "state/last-successful-run.json").exists())
class OutdoorUnfilteredTranscriptTests(SiaTranscriptTests):
def sia_fixture(self, root):
e = super().sia_fixture(root)
e["sources"][0].update(podcast_series="outdoor_unfiltered", episode_title="Synthetic Outdoor Unfiltered episode")
return e
def test_file_provenance_and_other_appearance(self):
for series in ("outdoor_unfiltered", "eoin_comerford_other"):
for valid in (True, False):
with self.subTest(series=series, valid=valid), tempfile.TemporaryDirectory() as tmp:
root = Path(tmp)
e = self.sia_fixture(root)
s = e["sources"][0]
del s["transcript_url"]
s.update(podcast_series=series, format="provided_speech_to_text", transcript_file="provided:synthetic.txt",
transcript_original_filename="synthetic.txt", transcript_sha256="a" * 64 if valid else "bad")
w.atomic_json(root / "evidence/run.json", e)
if valid:
w.finalize(root, "evidence/run.json")
else:
with self.assertRaises(ValueError):
w.finalize(root, "evidence/run.json")
self.assertFalse((root / "state/last-successful-run.json").exists())
if __name__ == "__main__":
unittest.main()