PDF Render
ci / checks (push) Successful in 52m51s

This commit is contained in:
khodowany
2026-10-08 00:07:07 -05:00
parent 841a3f974e
commit 300097a37e
12 changed files with 394 additions and 15 deletions
+4
View File
@@ -111,6 +111,8 @@ class CatalogTests(unittest.TestCase):
write_score(self.root, 'songs/tune.json')
generator.catalog.build_catalog(self.root)
(self.root / 'songs/tune.png').write_bytes(b'page')
(self.root / 'print').mkdir()
(self.root / 'print/tune.pdf').write_bytes(b'build-only PDF')
with tempfile.TemporaryDirectory() as temporary:
destination = pathlib.Path(temporary)
subprocess.run(['cmake', f'-DSOURCE={self.root}', f'-DDESTINATION={destination}', '-P', 'cmake/runtime_assets.cmake'], check=True, capture_output=True)
@@ -120,6 +122,8 @@ class CatalogTests(unittest.TestCase):
self.assertEqual(pathlib.Path(config['database']['path']).name, 'catalog.db')
self.assertTrue((destination / 'songs/tune.png').exists())
self.assertFalse(list(destination.rglob('*.json')))
self.assertFalse((destination / 'print').exists())
self.assertIn('PATTERN "print" EXCLUDE', pathlib.Path('cmake/zero.cmake').read_text())
def test_menu_query_uses_index_and_preserves_binary_identity_order(self):
for name, title, composer, part in (('z', 'Same', 'Bea', 'Acoustic'), ('b', 'Same', 'Ada', 'Vocal'), ('a', 'Same', 'Ada', 'Acoustic'), ('c', 'same', 'Ada', 'Electric'), ('d', 'Same', 'Ada', 'Acoustic')):
document = bundle(title=title, part=part)