]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-126014: Ignore `__pycache__`-only folders in makefile tests (GH-126066...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 29 Oct 2024 08:04:50 +0000 (09:04 +0100)
committerGitHub <noreply@github.com>
Tue, 29 Oct 2024 08:04:50 +0000 (08:04 +0000)
gh-126014: Ignore `__pycache__`-only folders in makefile tests (GH-126066)
(cherry picked from commit aeafaf4cda5bfce44bb054b4c530696901646abe)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Lib/test/test_tools/test_makefile.py

index e253bd0049ffa6e1e235ff9322e4db3581c8502d..f1f0cd87ba74961ffb900e6dbabdb01de12e0f76 100644 (file)
@@ -51,7 +51,10 @@ class TestMakefile(unittest.TestCase):
             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)