From 0ea84cdf1206411b84ab38dd3986e0161ab527a6 Mon Sep 17 00:00:00 2001 From: Shahar Naveh <50263213+ShaharNaveh@users.noreply.github.com> Date: Thu, 26 Feb 2026 04:03:47 +0100 Subject: [PATCH] update_lib test format fix + deps for atexit & eintr (#7227) * update_lib deps for atexit & eintr * Fix test format --- scripts/update_lib/cmd_todo.py | 13 ++++++------- scripts/update_lib/deps.py | 12 ++++++++++++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/scripts/update_lib/cmd_todo.py b/scripts/update_lib/cmd_todo.py index 23aec52d7..4f893c528 100644 --- a/scripts/update_lib/cmd_todo.py +++ b/scripts/update_lib/cmd_todo.py @@ -145,11 +145,8 @@ def get_all_tests(cpython_prefix: str) -> list[str]: tests = set() for entry in test_dir.iterdir(): - # Skip private/internal and special directories - if entry.name.startswith(("_", ".")): - continue # Skip non-test items - if not entry.name.startswith("test_"): + if not entry.name.startswith(("_test", "test_")): continue if entry.is_file() and entry.suffix == ".py": @@ -426,14 +423,14 @@ def format_test_todo_list( done_mark = "[x]" if primary["up_to_date"] else "[ ]" suffix = _format_test_suffix(primary) meta = _format_meta_suffix(primary) - lines.append(f"- {done_mark} {primary['name']}{suffix}{meta}") + lines.append(f"- {done_mark} `{primary['name']}`{suffix}{meta}") # Rest are indented for item in tests[1:]: done_mark = "[x]" if item["up_to_date"] else "[ ]" suffix = _format_test_suffix(item) meta = _format_meta_suffix(item) - lines.append(f" - {done_mark} {item['name']}{suffix}{meta}") + lines.append(f" - {done_mark} `{item['name']}`{suffix}{meta}") return lines @@ -501,7 +498,9 @@ def format_todo_list( test_done_mark = "[x]" if test_info["up_to_date"] else "[ ]" suffix = _format_test_suffix(test_info) meta = _format_meta_suffix(test_info) - lines.append(f" - {test_done_mark} {test_info['name']}{suffix}{meta}") + lines.append( + f" - {test_done_mark} `{test_info['name']}`{suffix}{meta}" + ) # Verbose mode: show detailed dependency info if verbose: diff --git a/scripts/update_lib/deps.py b/scripts/update_lib/deps.py index 58b259c8a..cc169f2ff 100644 --- a/scripts/update_lib/deps.py +++ b/scripts/update_lib/deps.py @@ -654,6 +654,18 @@ DEPENDENCIES = { "test_crossinterp.py", ], }, + "atexit": { + "test": [ + "test_atexit.py", + "_test_atexit.py", + ], + }, + "eintr": { + "test": [ + "test_eintr.py", + "_test_eintr.py", + ] + }, }