Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-38112: compileall tests: Use shorter name for long_path test #16419

Merged
merged 1 commit into from
Sep 26, 2019
Merged
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
8 changes: 6 additions & 2 deletions Lib/test/test_compileall.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def create_long_path(self):
# It will be 100 directories deep, or shorter if the OS limits it.
for i in range(10):
longer_path = os.path.join(
long_path, *(f"long_directory_{i}_{j}" for j in range(10))
long_path, *(f"dir_{i}_{j}" for j in range(10))
)

# Check if we can open __pycache__/*.pyc.
Expand Down Expand Up @@ -87,8 +87,12 @@ def create_long_path(self):
long_source = longer_source
long_cache = longer_cache

# On Windows, MAX_PATH is 260 characters, our path with the 20
# directories is 160 characters long, leaving something for the
# root (self.directory) as well.
# Tests assume long_path contains at least 10 directories.
if i < 2:
raise ValueError('Path limit is too short')
raise ValueError(f'"Long path" is too short: {long_path}')

self.source_path_long = long_source
self.bc_path_long = long_cache
Expand Down