From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Tue, 29 Oct 2024 08:04:50 +0000 (+0100) Subject: [3.12] gh-126014: Ignore `__pycache__`-only folders in makefile tests (GH-126066... X-Git-Tag: v3.12.8~156 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=385fa83a4348eaa146a84ad97056d2b10534b033;p=thirdparty%2FPython%2Fcpython.git [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 aeafaf4cda5bfce44bb054b4c530696901646abe) Co-authored-by: sobolevn Co-authored-by: Tomas R. --- diff --git a/Lib/test/test_tools/test_makefile.py b/Lib/test/test_tools/test_makefile.py index e253bd0049ff..f1f0cd87ba74 100644 --- a/Lib/test/test_tools/test_makefile.py +++ b/Lib/test/test_tools/test_makefile.py @@ -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)