Skip to content

Commit f866de6

Browse files
committed
Fix test format
1 parent 4561dbb commit f866de6

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

scripts/update_lib/cmd_todo.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,8 @@ def get_all_tests(cpython_prefix: str) -> list[str]:
145145

146146
tests = set()
147147
for entry in test_dir.iterdir():
148-
# Skip private/internal and special directories
149-
if entry.name.startswith(("_", ".")):
150-
continue
151148
# Skip non-test items
152-
if not entry.name.startswith("test_"):
149+
if not entry.name.startswith(("_test", "test_")):
153150
continue
154151

155152
if entry.is_file() and entry.suffix == ".py":
@@ -426,14 +423,14 @@ def format_test_todo_list(
426423
done_mark = "[x]" if primary["up_to_date"] else "[ ]"
427424
suffix = _format_test_suffix(primary)
428425
meta = _format_meta_suffix(primary)
429-
lines.append(f"- {done_mark} {primary['name']}{suffix}{meta}")
426+
lines.append(f"- {done_mark} `{primary['name']}`{suffix}{meta}")
430427

431428
# Rest are indented
432429
for item in tests[1:]:
433430
done_mark = "[x]" if item["up_to_date"] else "[ ]"
434431
suffix = _format_test_suffix(item)
435432
meta = _format_meta_suffix(item)
436-
lines.append(f" - {done_mark} {item['name']}{suffix}{meta}")
433+
lines.append(f" - {done_mark} `{item['name']}`{suffix}{meta}")
437434

438435
return lines
439436

@@ -501,7 +498,9 @@ def format_todo_list(
501498
test_done_mark = "[x]" if test_info["up_to_date"] else "[ ]"
502499
suffix = _format_test_suffix(test_info)
503500
meta = _format_meta_suffix(test_info)
504-
lines.append(f" - {test_done_mark} {test_info['name']}{suffix}{meta}")
501+
lines.append(
502+
f" - {test_done_mark} `{test_info['name']}`{suffix}{meta}"
503+
)
505504

506505
# Verbose mode: show detailed dependency info
507506
if verbose:

0 commit comments

Comments
 (0)