-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Misc doc updates (mostly around running tests) #4910
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jfly
force-pushed
the
update-run-tests-instructions
branch
from
January 7, 2022 07:11
9a2eb44
to
b4c6806
Compare
frostming
reviewed
Jan 7, 2022
jfly
force-pushed
the
update-run-tests-instructions
branch
from
January 7, 2022 07:59
b4c6806
to
d3f1458
Compare
This adds and documents a workaround for pypa#4909. It feels a bit weird to pretend to be CI just to run the test suite, though. Maybe we can do something about that later. I ran into a lot of trouble trying to get the tests to run when working on pypa#4908, and that was largely because the instructions in this CONTRIBUTING.md file seem to have rotted. 1. The bit about "can be run very simply" is bogus. It's unfortunately not that simple right now. 2. `make test` (the docker approach) fails for me with this error: ```bash $ make test docker-compose up [+] Running 1/0 ⠿ Container pipenv-pipenv-tests-1 Recreated 0.1s Attaching to pipenv-pipenv-tests-1 pipenv-pipenv-tests-1 | Collecting certifi pipenv-pipenv-tests-1 | Downloading https://files.pythonhosted.org/packages/37/45/946c02767aabb873146011e665728b680884cd8fe70dde973c640e45b775/certifi-2021.10.8-py2.py3-none-any.whl (149kB) pipenv-pipenv-tests-1 | Installing collected packages: certifi pipenv-pipenv-tests-1 | Successfully installed certifi-2021.10.8 pipenv-pipenv-tests-1 | Path: /root/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin pipenv-pipenv-tests-1 | Installing Pipenv... pipenv-pipenv-tests-1 | Obtaining file:///pipenv pipenv-pipenv-tests-1 | Complete output from command python setup.py egg_info: pipenv-pipenv-tests-1 | Traceback (most recent call last): pipenv-pipenv-tests-1 | File "<string>", line 1, in <module> pipenv-pipenv-tests-1 | File "/pipenv/setup.py", line 55 pipenv-pipenv-tests-1 | print(f"\033[1m{s}\033[0m") pipenv-pipenv-tests-1 | ^ pipenv-pipenv-tests-1 | SyntaxError: invalid syntax pipenv-pipenv-tests-1 | pipenv-pipenv-tests-1 | ---------------------------------------- pipenv-pipenv-tests-1 | Command "python setup.py egg_info" failed with error code 1 in /pipenv/ pipenv-pipenv-tests-1 exited with code 1 ``` The docker image it relies upon (https://hub.docker.com/r/kennethreitz/pipenv-tests) hasn't been updated in 4 years, so I assume it's just not something people use anymore? 3. Relatedly, there was a `Dockerfile` at the root of this repo that appears to be unused. Let me know if it's used somewhere I'm not realizing, I can add it back! 4. https://kennethreitz.org/essays/be-cordial-or-be-on-your-way seems to be a broken link now. I found https://kennethreitz.org/essays/2013/01/27/be-cordial-or-be-on-your-way on Google. 5. `./run-tests.sh` doesn't work for me. It's failing for the same reason described by @ncoghlan here: pypa/pip#7953 (comment). He said something about a `PIPENV_BOOTSTRAP` environment variable, but I can't find any information about that.
jfly
force-pushed
the
update-run-tests-instructions
branch
from
January 7, 2022 08:01
d3f1458
to
f42fcaa
Compare
If I do something like `pytest tests/integration/test_cli.py`, something about the ordering of imports means that `pipenv.environments` gets loaded *before* `pytest_sessionstart` runs, which means that `pipenv.environments.PIPENV_IS_CI` ends up false.
Urg, that didn't quite work. I've added another commit that should hopefully do it. |
@frostming, for the record, I'm happy with this PR and tests seem to be passing now. |
Thanks, @frostming! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 adds and documents a workaround for
#4909. It feels a bit weird to
pretend to be CI just to run the test suite, though. Maybe we can do
something about that later.
I ran into a lot of trouble trying to get the tests to run when working
on #4908, and that was largely
because the instructions in this CONTRIBUTING.md file seem to have
rotted.
The bit about "can be run very simply" is bogus. It's
unfortunately not that simple right now.
make test
(the docker approach) fails for me with this error:The docker image it relies upon
(https://hub.docker.com/r/kennethreitz/pipenv-tests) hasn't been
updated in 4 years, so I assume it's just not something people use
anymore?
Relatedly, there was a
Dockerfile
at the root of this repo thatappears to be unused. Let me know if it's used somewhere I'm not
realizing, I can add it back!
https://kennethreitz.org/essays/be-cordial-or-be-on-your-way seems to
be a broken link now. I found
https://kennethreitz.org/essays/2013/01/27/be-cordial-or-be-on-your-way
on Google.
./run-tests.sh
doesn't work for me. It's failing for the samereason described by @ncoghlan here:
Cannot install into user site directory with editable source. pip#7953 (comment). He
said something about a
PIPENV_BOOTSTRAP
environment variable, but Ican't find any information about that.