-
Notifications
You must be signed in to change notification settings - Fork 415
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
Do not add /usr/bin to PATH during tests #298
Do not add /usr/bin to PATH during tests #298
Conversation
When scripts (e.g. ansible) already exist in /usr/bin then pipx will trace warnings that they are already in PATH. This causes test failures when we assert that no warnings are traced.
Thank you for the PR. The reason that workaround is in the test is due to black depending on a package that added gcc as a requirement (pipx installs black as part of its test suite). Other black users are running into the same issue, and are trying to get the gcc dependency eliminated from the black installation process, which may have happened by now. See psf/black#1112. It might be possible to remove all of the code trying to add gcc to the path in the first place. At the very least, we should add logic such that it only happens on Travis. It might also be the case that if gcc is still required by black, re-adding Before approving and merging these changes, can the following be tried (in this order)? The first solution that passes on travis should be used.
|
#299 (option 1) succeeded, so I'll close this PR in favor of that one. |
Tests on my local (macOS) computer have regressed because of this. Now building package regex with clang is causing test fails again on my computer. |
It looks like this |
We could take a similar approach to this PR:
In the future if any other build tools are identified for various platforms then it would just require updating that one workaround fixture. |
That sounds great. I was just trying to figure out the right way to do that, because I want to test some VCS package specifications that require |
Testing started working for me on macOS. So possibly something got fixed upstream. |
I had the same issue until I started doing some troubleshooting and ended up causing |
When scripts (e.g. ansible) already exist in /usr/bin then pipx will
trace warnings that they are already in PATH. This causes test failures
when we assert that no warnings are traced.
The specific test that was failing for me was: