-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Test Discovery Fails - Reports as PyTest not installed #6347
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
Comments
Additionally, this is new and maybe related. Ctrl + Shift + P -> Python: Configure Tests yeilds: could be related: |
Verified my alternate work computer has the same problem. All machines I have across all python projects are failing on this as of today. |
I'm in the same situation of you except I'm in MacOS 10.14.5. I directly downgrade the version of the extension to go back to the previous version. |
+1, I am on Mac 10.14, presumably started after last update of python extension |
Same problem here. Downgrading to the previous version (2019.5.18875) fixes the problem. |
downgrading the extension works for me as well. version (2019.5.18875) |
Hello @drcrook1 , @bchamand , @jahan01 and @lukasz-migas 👋 thank you for reporting this issue and confirming that downgrading the extension works. If you could verify the following while I comb through the extension that'd be great 🔎:
|
@kimadeline |
The failing discovery command is We changed how Assuming you have this structure (notice the absence of
There is a difference in running By adding In other words because we are doing the "right" thing by directly plugging into pytest to do discovery, pytest's |
FWIW, it is a bit more correct to say the command is |
Hmm, maybe not so much. We should be setting $PYTHONPATH for the script exec. The old code was invoking pytest with |
The solution will be to fix |
I noticed that the TestExplorer shows all Paths as lowercase. Therefore it could not find folders and modules within. In your case PACKAGEX might be uppercase too. Might there be a connection? |
Dup of #5919 |
Uh oh!
There was an error while loading. Please reload this page.
Testing was working yesterday; I signed off around 4:45pm EST, got up this morning and encountered issues discovering and importing the packages from vscode. To me it appears as though the root of the workspace is not being added to the path.
Example: executing python -m pytest ETC from c:/projects/customers/CUSTOMERX/PROJECTX/ adds that to the path, specifying ./tests/ searches ./tests for tests and I can import the high level package from there. I feel as if the break is likely in this area.
Environment data
VS Code version: XXX
Version: 1.35.1 (user setup)
Commit: c7d83e57cd18f18026a8162d042843bda1bcf21f
Date: 2019-06-12T14:30:02.622Z
Electron: 3.1.8
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.17134
Extension version (available under the Extensions sidebar): 2019.6.22090 (25 June 2019)
Python version (& distribution if applicable, e.g. Anaconda): Anaconda 2019.03 for Windows python version 3.6.8
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A base
Relevant/affected Python packages and their versions: pytest
Jedi or Language Server? (i.e. what is
"python.jediEnabled"
set to; more info How to update the language server to the latest stable version #3977): Jedi enabled (output indicates it started jedi python language engine)Expected behaviour
Discover Unit Tests - for example below works:
Actual behaviour
From the python test log (outputs) - Tried pytest 4.6.2, 4.6.3 and 4.4.1
My folder structure:
.vscode/settings.json
The text was updated successfully, but these errors were encountered: