"""Write tests/smoke/sweep.tsv: every No-Intro cartridge, pictures at frames 300, 900 and 1,500, no inputs (M7's library sweep).""" import os import sys from pathlib import Path NO_INTRO = ( Path(os.environ.get("NO_INTRO_DIR") or sys.exit("set NO_INTRO_DIR to the No-Intro romset folder")) / "Coleco - ColecoVision" ) out = Path(__file__).resolve().parents[1] / "tests/smoke/sweep.tsv" rows = ["# M7 sweep: title\tframes\tinputs\tnote"] rows += [ f"{p.stem}\t300,900,1500\t\t" for p in sorted(NO_INTRO.glob("*.zip")) if not p.name.startswith("[BIOS]") ] out.write_text("\n".join(rows) + "\n", encoding="utf-8") print(len(rows) - 1, "titles ->", out)