[3.12] gh-126014: Ignore __pycache__-only folders in makefile tests (GH-126066) (#126110)

gh-126014: Ignore `__pycache__`-only folders in makefile tests (GH-126066)
(cherry picked from commit aeafaf4cda)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
This commit is contained in:
Miss Islington (bot) 2024-10-29 09:04:50 +01:00 committed by GitHub
parent 8da17bb4f7
commit 385fa83a43
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -51,7 +51,10 @@ def test_makefile_test_folders(self):
if not dirs and not files:
continue
# Skip dirs with hidden-only files:
if files and all(filename.startswith('.') for filename in files):
if files and all(
filename.startswith('.') or filename == '__pycache__'
for filename in files
):
continue
relpath = os.path.relpath(dirpath, support.STDLIB_DIR)