-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Test discovery failure / regression for uniitest #24578
Comments
what python version do you have? We haven't made any changes in this area recently (edit I see now it says 3.12) |
What happens if you try and run unittest from the command line with the same arguments you have in your settings? Can you also try looking at your python path variable from the terminal vs the vscode run? I am thinking something in your path might not be showing up right as you are looking for a custom logger file |
Thanks. |
if you add
at the very top of your file, before it attempts this import |
That first module looks mighty suspicious.
|
ok yes seems like we are adding your cwd to your path which is not the expected behavior. I will have to review why we started inserting it in the first place because I likely added it due to another bug in the opposite direction. Moving this back to the python extension as this is related to the testing infrastructure there more. |
@karthiknadig thoughts here? Not sure what is the best pick with the python path ordering since I had added the rootdir to the path to fix a previous issue: bd6a924 |
It seems like you shouldn't really be inserting anything at the start of the path that can override the system modules. |
@eleanorjboyd typically we should be prefixing all modules that we have with |
Behaviour
Similar to the issue reported here
#16593
and somewhat in here
#17641 (comment)
Test discovery is crashing (see output below).
This looks like it's the old problem of syspath being wrong and it is trying to import a local module called "logging" instead of the system one.
This appears to be a regression, is it was working previously and nothing else has changed for me other than upgrading vscode and extensions.
Steps to reproduce:
Diagnostic data
settings.json test section:
Debugger output:
The text was updated successfully, but these errors were encountered: