From 4745ac13a48d60a7b9d994da40446df763d2ec9d Mon Sep 17 00:00:00 2001 From: sobolevn Date: Mon, 28 Oct 2024 11:50:35 +0300 Subject: [PATCH 1/2] gh-126014: Ignore `__pycache__`-only folders in makefile tests --- 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 df95e6d0068516d..760b0e237703db3 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 in {'__pycache__'} + for filename in files + ): continue relpath = os.path.relpath(dirpath, support.STDLIB_DIR) From b253d4be301bb6123da38a0f8080187e6fb1ed2e Mon Sep 17 00:00:00 2001 From: sobolevn Date: Tue, 29 Oct 2024 07:46:18 +0300 Subject: [PATCH 2/2] Update Lib/test/test_tools/test_makefile.py Co-authored-by: Tomas R. --- Lib/test/test_tools/test_makefile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_tools/test_makefile.py b/Lib/test/test_tools/test_makefile.py index 760b0e237703db3..4c7588d4d93fc38 100644 --- a/Lib/test/test_tools/test_makefile.py +++ b/Lib/test/test_tools/test_makefile.py @@ -53,7 +53,7 @@ def test_makefile_test_folders(self): continue # Skip dirs with hidden-only files: if files and all( - filename.startswith('.') or filename in {'__pycache__'} + filename.startswith('.') or filename == '__pycache__' for filename in files ): continue