Build the site once per test run, and split every page into tags once, for all the tests that read built pages
Twelve test modules each ran the whole build, and each of them walked every page with its own parser. They now share one build (web/tests/builtsite.py), made in a directory of the run's own, and one recording of each page, made on all the cores. test_thumbs's second build and test_google_tag's two builds still build, on their own, as before; the google tag builds run side by side. web/tests/run.py runs the modules side by side. test_extra's elevation tile check now compares with the last entry of connect-src, which is where the tile path is since the Google tag added three before it. New tests keep the build's shortcuts honest (test_build_store.py). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
84d5770e13
commit
7c321c6e15
16 files changed
+561
-87
No files matched your search
@@ -23,7 +23,9 @@ except Exception: # Pillow, fontTools or brotli missing
|
||||
|
||||
from olt import cards, records, site # noqa: E402
|
||||
|
||||
SITE = os.path.join(WEB, ".cache", "test-site")
|
||||
import builtsite # noqa: E402
|
||||
|
||||
SITE = builtsite.OUT
|
||||
GAP = 6 # px of clear space between two lines of text
|
||||
TRACK_GAP = 24 # px between the text column and the track
|
||||
EDGE = 40 # px between the track and the card's edges
|
||||
@@ -47,6 +49,7 @@ def track_parts(tid):
|
||||
class CardLayout(unittest.TestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
builtsite.ensure()
|
||||
cls.tmp = tempfile.TemporaryDirectory()
|
||||
cls.fonts = make_cards.load_fonts(cls.tmp.name)
|
||||
cls.measure = make_cards.Measure(cls.fonts)
|
||||
|
||||
Reference in new issue
Block a user