]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-126014: Ignore `__pycache__`-only folders in makefile tests (#126066)
authorsobolevn <mail@sobolevn.me>
Tue, 29 Oct 2024 07:43:48 +0000 (10:43 +0300)
committerGitHub <noreply@github.com>
Tue, 29 Oct 2024 07:43:48 +0000 (10:43 +0300)
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Lib/test/test_tools/test_makefile.py

index df95e6d0068516d25f007a59d3ac7118ce1308ce..4c7588d4d93fc38c528186e7253b3a3f15bb9f8d 100644 (file)
@@ -52,7 +52,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)