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

Add unit tests for pip commands not using cwd #7987

Merged
merged 5 commits into from
Apr 10, 2020

Conversation

deveshks
Copy link
Contributor

@deveshks deveshks commented Apr 5, 2020

Follow-up of #7955 . Fixes and closes #7731, closes #2926, closes #3710 and closes #7971

Add unit tests for check, freeze, show and install to verify that the behaviour of python -m pip is same as pip when run from the current working directory, and verifying that adding current working directory to PYTHONPATH displays the appropriate behaviour with python -m pip

@deveshks
Copy link
Contributor Author

deveshks commented Apr 6, 2020

Hi @sbidoul , @xavfernandez

This PR is a followup of #7955 to add unit tests for the remaining 4 commands affected by this on the same principle.

Would really appreciate if you can take a look at the same and share your thoughts 😊

tests/functional/test_check.py Outdated Show resolved Hide resolved
tests/functional/test_check.py Outdated Show resolved Hide resolved
@deveshks
Copy link
Contributor Author

deveshks commented Apr 7, 2020

Hi @xavfernandez

I have addressed the review comments. Please let me know if there are further changes needed.

tests/functional/test_check.py Outdated Show resolved Hide resolved
tests/functional/test_check.py Outdated Show resolved Hide resolved
tests/functional/test_freeze.py Show resolved Hide resolved
tests/functional/test_freeze.py Outdated Show resolved Hide resolved
tests/functional/test_freeze.py Outdated Show resolved Hide resolved
tests/functional/test_install.py Show resolved Hide resolved
tests/functional/test_install.py Outdated Show resolved Hide resolved
@deveshks deveshks requested a review from sbidoul April 8, 2020 08:30
@deveshks
Copy link
Contributor Author

deveshks commented Apr 8, 2020

Hi @sbidoul

I have addressed the review comments. Please let me know if there are further changes needed.

Copy link
Member

@sbidoul sbidoul left a comment

Choose a reason for hiding this comment

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

@deveshks thanks for your patience. I realize there were a couple comments I had not submitted, sorry about that.

tests/functional/test_install.py Show resolved Hide resolved
tests/functional/test_install.py Show resolved Hide resolved
@deveshks
Copy link
Contributor Author

@deveshks thanks for your patience. I realize there were a couple comments I had not submitted, sorry about that.

No worries @sbidoul . I have addressed the review comments in my latest commit. Please take a look.

@deveshks deveshks requested a review from sbidoul April 10, 2020 05:04
Copy link
Member

@sbidoul sbidoul left a comment

Choose a reason for hiding this comment

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

@deveshks LGTM. I have verified that the test correctly react to sys.path changes in __main__.py.
Thank you for this work!

@deveshks
Copy link
Contributor Author

Thanks @sbidoul for the approval.

Hi @xavfernandez , @pradyunsg ,

If the changes look good, could I please get this PR merged as well ?

@pradyunsg pradyunsg merged commit 9360793 into pypa:master Apr 10, 2020
@deveshks deveshks deleted the add-tests-for-pip-cmds-ignoring-cwd branch April 10, 2020 09:01
@sbidoul
Copy link
Member

sbidoul commented Apr 10, 2020

@deveshks there were two additional comments by @xavfernandez after I approved. Can you attend them in a separate PR?

@deveshks
Copy link
Contributor Author

@deveshks there were two additional comments by @xavfernandez after I approved. Can you attend them in a separate PR?

Hi @sbidoul , @xavfernandez

Thanks for catching that. It seems like the commit I made to address rewording the comments didn't show up here. As suggested, I have created a new PR to address the comments at #8012 . Please take a look 😊

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label May 20, 2020
@lock lock bot locked as resolved and limited conversation to collaborators May 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
4 participants