From 19985807722eb5f12089aeee11ac3c8b7a255f67 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Sat, 24 Oct 2026 02:34:47 +0200 Subject: [PATCH] fix: start each pack run with no stale notices _MISSING_DATA_DIRS is module state: a test that called main() after one whose data directories were not cached exited 1 with the earlier run's notice. main() now clears it first. --- scripts/generate_pack.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/generate_pack.py b/scripts/generate_pack.py index c2ec6857..a568f0e8 100644 --- a/scripts/generate_pack.py +++ b/scripts/generate_pack.py @@ -3091,6 +3091,9 @@ _MISSING_DATA_DIRS: set[str] = set() def main() -> None: + # One run's account: tests call main() repeatedly in one process, and a + # notice left by an earlier run failed a later one that missed nothing. + _MISSING_DATA_DIRS.clear() with contextlib.ExitStack() as held: try: _main(held)