From 39d080ea5d9bdb6ed40c03c2784a4f3539552538 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Sun, 24 Mar 2024 11:41:51 +0300 Subject: [PATCH] gh-117166: Ignore empty and temporary dirs in `test_makefile` --- Lib/test/test_tools/test_makefile.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_tools/test_makefile.py b/Lib/test/test_tools/test_makefile.py index 7222a054dcd61c..25c9ab770df217 100644 --- a/Lib/test/test_tools/test_makefile.py +++ b/Lib/test/test_tools/test_makefile.py @@ -43,7 +43,11 @@ def test_makefile_test_folders(self): used = [idle_test] for dirpath, _, _ in os.walk(support.TEST_HOME_DIR): dirname = os.path.basename(dirpath) - if dirname == '__pycache__': + if ( + dirname == '__pycache__' + or dirname.startswith('.') + or not os.listdir(dirpath) + ): continue relpath = os.path.relpath(dirpath, support.STDLIB_DIR)