-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Tests assume that the git default branch is "master" #10350
Comments
I'm not sure how best to fix this, logging it as an issue so it doesn't get forgotten. I'm not sure if I'll have time to fix it myself, I can simply ignore these errors on my local machine for now. |
Hmm, I can’t reproduce (at least your first one). $ git config --add init.defaultbranch main # This sets the config.
$ git config --get init.defaultbranch
main
$ tox -e py38 -- -k test_git_install_branch_again_after_branch_changes
[a ton of output]
===================== 1 passed, 2242 deselected, 116 warnings in 41.94s =====================
__________________________________________ summary __________________________________________
py38: commands succeeded
congratulations :) There’s probably some Git magic we’re not getting right… |
I've had this set for a while, and the tests certainly work. Did you set The output of the following will help confirm/eliminate this hypothesis:
|
It's set globally. Don't worry too much about it - if it's only happening for me, I'll try to work out what's odd with my config first. As I said, I can ignore those test failures for now. |
has something like this happened before? the tests fail on a local machine but pass during CI? I am experiencing something similar.
maybe we could think about using docker for development if these issues occur more than a few times? |
Very much not. pip runs on a variety of platforms. Pushing all of our development to docker would means everything else is a second class citizen, and I don't think we want that. I'd much rather we identify the issues of why these tests fail in some environments and fix that. |
okay, fair enough. makes sense |
@pfmoore have you ran into this issue again since opening this issue? It's been a while since I last tried to reproduce this, but I wasn't successful like the others as well. It's perplexing as AFAIU, the test harness does try to isolate git's configuration from the user's environment. |
Unless it turns out that @pfmoore is still running into this, I'm going to say this is no longer a concern. We haven't been able to reproduce the issue and things haven't broke broadly so yeah. LFTM. |
Sorry I missed the previous question, no it's not been happening for a while, so agreed, it can be closed. |
Description
My git config has "main" as the default branch (I don't know where this got set TBH)
The following tests are failing:
Expected behavior
Tests should not depend on the user's git configuration
pip version
Latest checkout from git, main branch (ironically :-))
Python version
3.9.4
OS
Windows 10
How to Reproduce
Output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: