We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
test_makefile
1 parent 06ba6c8 commit fad48eaCopy full SHA for fad48ea
Lib/test/test_tools/test_makefile.py
@@ -41,9 +41,17 @@ def test_makefile_test_folders(self):
41
self.assertIn(idle_test, test_dirs)
42
43
used = [idle_test]
44
- for dirpath, _, _ in os.walk(support.TEST_HOME_DIR):
+ for dirpath, dirs, files in os.walk(support.TEST_HOME_DIR):
45
dirname = os.path.basename(dirpath)
46
- if dirname == '__pycache__':
+ # Skip temporary dirs:
47
+ if dirname == '__pycache__' or dirname.startswith('.'):
48
+ dirs.clear() # do not process subfolders
49
+ continue
50
+ # Skip empty dirs:
51
+ if not dirs and not files:
52
53
+ # Skip dirs with hidden-only files:
54
+ if files and all(filename.startswith('.') for filename in files):
55
continue
56
57
relpath = os.path.relpath(dirpath, support.STDLIB_DIR)
0 commit comments