]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-126014: test_makefile_test_folders: Ignore basically-empty directories...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 27 Jan 2026 10:30:59 +0000 (11:30 +0100)
committerGitHub <noreply@github.com>
Tue, 27 Jan 2026 10:30:59 +0000 (10:30 +0000)
commitd11c067246a9f80a3b67f3dbfd2527abc970f0b2
tree098ccb6c70e4b6ff25db5e64a64f1c8c0d8dbf84
parent7af0d0607d50e53efabb836f551e5e8d7c4510e8
[3.14] gh-126014: test_makefile_test_folders: Ignore basically-empty directories (GH-140466) (#144269)

gh-126014: test_makefile_test_folders: Ignore basically-empty directories (GH-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.
(cherry picked from commit 17d447e993a0ff9b7d44786ceb2a8f9510638bfa)

Co-authored-by: Stefano Rivera <stefano@rivera.za.net>
Lib/test/test_tools/test_makefile.py