-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Large number of test failures on Windows local environment #10443
Comments
Immediate thoughts: I don't install svn, Mercurial or Bazaar, so those tests might fail. Also, I call my local venv Beyond that, I'd have to look at the outputs, the issue says "see attached files" but I don't know where they are attached. |
I thought installing them is weird but that's what the getting started page says to do.
I get the same issue calling my venv something else and/or locating it in a different folder. The reason I called it "venv" is I'm trying to follow the getting started guide to the letter and that's what it says to do.
Where I've written "attached run-tests.txt for exact copy" the "run-tests.txt" is a hyper link to the attachment. I'm not used to attaching hyper links on GitHub this was the best I could do to make them visible. The output is over 6 MBs so I couldn't paste it in to the text box. |
From a quick look it seems like an environment issue. A ton of errors are reported by |
Git is available and working as you can see from my env-setup.txt Python is not available in my normal environment but is available in the virtual environment which is activated when I run the tests. Does tox stay in the virtual environment or does it break out when it runs subprocesses?
Sure I'll give that a try when I'm back home later today. |
Regarding the inability to run For Git, is your |
Can you try running with --use-venv passed through through pytest? That would be: |
My guess (based on looking at the file on my phone) is that virtualenv is not creating a valid environment in your system for some reason. For what it's worth, pip's test suite uses a really old version of virtualenv, so that could be implicated in this. |
Further, you don't need to install Subversion, Bazaar or Mercurial -- the test suite checks if their executables are available and skips the tests if not. |
And, I'll also echo @pfmoore's suggestion of not calling your virtual environment directory |
This is what the documentation tell you to do which after many failures I tried following to the letter https://pip.pypa.io/en/latest/development/getting-started/ :
As I said in an above comment I've tried with different names and in different locations and got the same errors. But again trying to follow this https://pip.pypa.io/en/latest/development/getting-started/ to the letter:
I'm collecting everyone's responses and I'll try them all when I have some time to work on this again, hopefully tomorrow. Thanks for the input. |
Nice, so we've got bugs to fix in the gettign started guide. :) |
Here is the output (now using
I don't know what this is supposed to look like, but it concerns me it seems to mostly be pointing to my base Python install and not my virtual environment
Possibly, I definetly reproduce the
Roughly same number of failures but completes ~8x faster. |
After seeing @uranusjr hint about this bug https://bugs.python.org/issue38905 I tried a fresh install of Python but I chose the non-default option of adding Python to the PATH This seems to have "fixed" the issue and I am getting significantly less failures running this:
However this is less than ideal as I was explicitly avoiding putting this version of Python off the PATH as
I'm going to have to have a think about how to proceed with my pip development environment. This issue can probably be closed based on updating the documentation pull request #10449 unless anyone thinks there's something that can be technically fixed here by pip and not tox. |
I don’t have
This makes me think the issue may be in Tox; it should use I’d suggest the next step is to reduce the setup into a minimal reproducing example (blank project + venv + tox + a simplistic test showing the unintended behaviour). Once you succeed in building that, report the issue to Tox. |
I agree, but I don't understand exactly what tox does yet, I'll try and read through some guides on how to set up a project and work on a minimal test case. |
Closing this issue, with nox instead of tox there are way less FAILEDs (specifically 8 integration tests and 5 unit tests) running pip's test suite locally on Windows even though Python isn't on the PATH. What failures there are I will try and identify specifically, for example this issue covers all the unit test fails I get: #10816 |
Description
When trying to make first simple pull request for #10415 I am unable to get tests mostly working following this guide on Windows: https://pip.pypa.io/en/latest/development/getting-started/
My final output is something like:
I do not have this problem on Linux (under WSL 2). where only a few tests failed following the same instructions:
Expected behavior
Tests in Windows should work when following the docs instructions
pip version
pip 21.3.dev0
Python version
Python 3.9.7
OS
Windows 10 Version 21H1 (OS Build 19043.1165)
How to Reproduce
Follow https://pip.pypa.io/en/latest/development/getting-started/ as best as possible.
Step 1 - Install Binary Requirements
Step 2 - Setup Pip Virtual Environment and test depenencies
(see attached env-setup.txt for exact copy of commands and output)
Step 3 - Run Tests
(see attached run-tests.txt for exact copy of commands and output, I had problems capturing the output so eventually I used "tee" to do this, hopefully it didn't mess up the output too much not to understand)
Output
See attached files above. (duplicated below by @pradyunsg)
Code of Conduct
The text was updated successfully, but these errors were encountered: