Files
Jyotisha/tests/test_report_english_sweep.py
T
jesse-uxGrok (agent loop)Cursor
ba1ffeb35f fix(report): keep the English edition when one phrase was untranslated
The English personal report was discarded whenever a Chinese fragment survived the trailing glossary. English sections now render the English fields that were already calculated.

Co-Authored-By: Grok (agent loop)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-22 02:56:00 +08:00

28 lines
1.1 KiB
Python

"""200 fixed fictional charts: the English edition must come back whole (issue #89).
This file is not on the quick gate. Windows timing is recorded in
docs/tasks/PROGRESS-report-english-han-leak-20261021.md. Set
REPORT_ENGLISH_SWEEP_DUMP to a directory to write the English markdown for
the acceptance pass. Workers stay at 4.
"""
from __future__ import annotations
import os
from concurrent.futures import ProcessPoolExecutor, as_completed
from tests.report_english_fictional import CHART_COUNT, render_english
def test_two_hundred_fictional_charts_have_clean_english() -> None:
workers = min(4, os.cpu_count() or 1, CHART_COUNT)
failures = []
with ProcessPoolExecutor(max_workers=workers) as pool:
futures = [pool.submit(render_english, index) for index in range(CHART_COUNT)]
for future in as_completed(futures):
row = future.result()
if row["status"] != "ok" or row["han"] or row["glue"]:
failures.append(
f"#{row['i']} status={row['status']} han={row['han']} chars={row['han_chars']} glue={row['glue']}"
)
assert failures == []