From 9c0d768c4361299138b5b88dfa1a3292ad9a3fa2 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Tue, 29 Oct 2024 10:43:48 +0300 Subject: [PATCH] gh-126014: Ignore `__pycache__`-only folders in makefile tests (GH-126066) (cherry picked from commit aeafaf4cda5bfce44bb054b4c530696901646abe) Co-authored-by: sobolevn Co-authored-by: Tomas R. --- Lib/test/test_tools/test_makefile.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_tools/test_makefile.py b/Lib/test/test_tools/test_makefile.py index df95e6d0068516..4c7588d4d93fc3 100644 --- a/Lib/test/test_tools/test_makefile.py +++ b/Lib/test/test_tools/test_makefile.py @@ -52,7 +52,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)