]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-126014: test_makefile_test_folders: Ignore basically-empty directories (#140466)
authorStefano Rivera <stefano@rivera.za.net>
Tue, 27 Jan 2026 10:05:09 +0000 (02:05 -0800)
committerGitHub <noreply@github.com>
Tue, 27 Jan 2026 10:05:09 +0000 (11:05 +0100)
commit17d447e993a0ff9b7d44786ceb2a8f9510638bfa
treeeb206343819a69ed6b57f1102952f9334aa666a0
parent487bd2dea538e36cb620dd9e0f298d731b9ede8a
gh-126014: test_makefile_test_folders: Ignore basically-empty directories (#140466)

The code in test_makefile was attempting to ignore any
non-interesting files, but missed some corners:

1. There is never a *file* called `__pycache__`.
2. A directory containing only a `__pycache__` subdirectory should be
   ignored.
3. A directory containing only hidden files should be ignored.

Simplify this all into a couple of filters that let us check for empty
lists.
Lib/test/test_tools/test_makefile.py