[MRG] Fix integration test for new pip #491
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an attempt to fix the integration test. Closes #490.
The TL;DR is that the newest version of pip will switch to the behaviour of
pip install --user ...
when you runpip install ...
without being able to write to the global package directory. This means our integration test started to fail because the install we were doing now succeeded. However we were testing if a user could install things to the global directory or not. This means the test failing was a false positive (the install succeeded but not because the user could write to the global dir).This PR makes it so that the
pip
command used in the test won't enable--user
if it can't write to the global directory. Instead it will fail (as it used to).An alternative would be to check if the pip command fails and if it succeeds check the location the package got installed to.