Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6db3e0c

Browse files
authored
check_distutils test: Make the file path of missing setuptools distutils files more obvious (#13037)
1 parent 3c869a3 commit 6db3e0c

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

tests/check_typeshed_structure.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,13 @@ def check_distutils() -> None:
9393
def all_relative_paths_in_directory(path: Path) -> set[Path]:
9494
return {pyi.relative_to(path) for pyi in path.rglob("*.pyi")}
9595

96-
all_setuptools_files = all_relative_paths_in_directory(STUBS_PATH / "setuptools" / "setuptools" / "_distutils")
97-
all_distutils_files = all_relative_paths_in_directory(STUBS_PATH / "setuptools" / "distutils")
96+
setuptools_path = STUBS_PATH / "setuptools" / "setuptools" / "_distutils"
97+
distutils_path = STUBS_PATH / "setuptools" / "distutils"
98+
all_setuptools_files = all_relative_paths_in_directory(setuptools_path)
99+
all_distutils_files = all_relative_paths_in_directory(distutils_path)
98100
assert all_setuptools_files and all_distutils_files, "Looks like this test might be out of date!"
99101
extra_files = all_setuptools_files - all_distutils_files
100-
joined = "\n".join(f" * {f}" for f in extra_files)
102+
joined = "\n".join(f" * {distutils_path / f}" for f in extra_files)
101103
assert not extra_files, f"Files missing from distutils:\n{joined}"
102104

103105

0 commit comments

Comments
 (0)