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

dry-run and fast-deps behavior testing #12193

Merged
merged 6 commits into from
Aug 14, 2023

Conversation

cosmicexplorer
Copy link
Contributor

@cosmicexplorer cosmicexplorer commented Aug 1, 2023

Split out from #12186. In that change, we found that multiple behaviors we expected from install --dry-run weren't tested. This change tests that:

  1. We correctly check the hash for any files that were already downloaded for whatever reason.
  2. We do not install anything when install --dry-run is specified.

Pip already does these correctly, but now we can be sure.

This also modifies another test (test_trailing_slash_directory_metadata()) to avoid using .get_dist(). This version of the test is more correct and avoids a reliance on .get_dist(), which will be removed in #12186.

@cosmicexplorer
Copy link
Contributor Author

cc @sbidoul @pradyunsg @uranusjr no rush at all; github doesn't allow me to request reviewers (which is fine).

@cosmicexplorer cosmicexplorer force-pushed the metadata-behavior-testing branch 2 times, most recently from 9c52698 to 700af48 Compare August 9, 2023 08:56
@cosmicexplorer
Copy link
Contributor Author

@pfmoore this is also probably easy to review and merge.

Copy link
Member

@pfmoore pfmoore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No real objections to any of this, but there are a few places I wouldn't describe the new code as "clear". That's a matter of opinion, and I'm unlikely to look at these tests very often in future anyway, so I don't want to block the PR because of it, but if it could be simplified/clarified, that would be good.

tests/functional/test_fast_deps.py Show resolved Hide resolved
tests/functional/test_fast_deps.py Show resolved Hide resolved
tests/functional/test_install.py Outdated Show resolved Hide resolved
tests/functional/test_install.py Show resolved Hide resolved
@cosmicexplorer cosmicexplorer changed the title Metadata behavior testing pip install behavior testing Aug 12, 2023
@cosmicexplorer cosmicexplorer changed the title pip install behavior testing dry-run and fast-deps behavior testing Aug 12, 2023
@uranusjr uranusjr merged commit 0778c1c into pypa:main Aug 14, 2023
24 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants