Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions Lib/test/test_tools/test_makefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,18 @@ def test_makefile_test_folders(self):
if dirname == '__pycache__' or dirname.startswith('.'):
dirs.clear() # do not process subfolders
continue
# Skip empty dirs:

# Skip empty dirs (ignoring hidden files and __pycache__):
files = [
filename for filename in files
if not filename.startswith('.')
]
dirs = [
dirname for dirname in dirs
if not dirname.startswith('.') and dirname != "__pycache__"
]
if not dirs and not files:
continue
# Skip dirs with hidden-only files:
if files and all(
filename.startswith('.') or filename == '__pycache__'
for filename in files
):
continue

relpath = os.path.relpath(dirpath, support.STDLIB_DIR)
with self.subTest(relpath=relpath):
Expand Down
Loading