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

Fix creation of test cache for clean checkout #1125

Merged
merged 1 commit into from
Dec 2, 2023

Conversation

potiuk
Copy link
Contributor

@potiuk potiuk commented Dec 2, 2023

  • I have added an entry to docs/changelog.md

(I think I do not need to add this change to changelog - it's purely development environment fix).

Summary of changes

The development environment test cache creation is pretty cool, but for first-time user creating the cache does not work cleanly because it misses directories and cache cannot be created.

Adding parents=True fixes the problem.

Test plan

Tested by running

rm -rf .pipx_tests .pytest_cache
pytest tests/test_install.py

This failed with:

Exception: Directory /Users/jarek/IdeaProjects/pipx/.pipx_tests/package_cache does not contain all package distribution files necessary to run pipx tests. Please run the following command to populate it: /Users/jarek/IdeaProjects/pipx/venv/bin/python scripts/update_package_cache.py testdata/tests_packages /Users/jarek/IdeaProjects/pipx/.pipx_tests/package_cache

Before the fix running:

/Users/jarek/IdeaProjects/pipx/venv/bin/python scripts/update_package_cache.py testdata/tests_packages /Users/jarek/IdeaProjects/pipx/.pipx_tests/package_cache

causes "No such file or directory"

After the fix, environment gets setup properly

The development environment test cache creation is pretty cool,
but for first-time user creating the cache does not work cleanly
because it misses directories and cache cannot be created.

Adding `parents=True` fixes the problem.
@gaborbernat gaborbernat merged commit 9bcd490 into pypa:main Dec 2, 2023
2 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants