process: keep the original run.log when a re-run renders nothing; dispatch input to override the voice URL (testing); drop netcheck

This commit is contained in:
Audiobook Producer
2026-10-18 01:50:11 -05:00
parent 153153010e
commit 9cba035adc
4 changed files with 13 additions and 24 deletions
+2
View File
@@ -117,6 +117,7 @@ class ProcessTests(unittest.TestCase):
"book.json", "warnings.log", "LICENSE_STATUS.md"):
self.assertTrue(os.path.exists(os.path.join(b, rel)), rel)
self.assertIn("public domain", open(os.path.join(b, "LICENSE_STATUS.md")).read())
log_before = open(os.path.join(b, "audio", "run.log")).read()
mtimes = {n: os.path.getmtime(os.path.join(b, "audio", n)) for n in names if n.endswith(".mp3")}
posts = len(Stub.posts)
self.assertGreater(posts, 0)
@@ -125,6 +126,7 @@ class ProcessTests(unittest.TestCase):
self.assertEqual(rc, 0, out)
self.assertEqual(len(Stub.posts), posts)
self.assertIn("nothing to render", out)
self.assertEqual(log_before, open(os.path.join(b, "audio", "run.log")).read()) # original render log kept
self.assertEqual(mtimes, {n: os.path.getmtime(os.path.join(b, "audio", n)) for n in mtimes})
rc, out = run_process(self.cfg, self.pdf, force=True) # forced: renders again
self.assertEqual(rc, 0, out)