-
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
Pytest discovery fails #21576
Comments
Hi! Could you send your pytest version? |
likely it is #21540. If the version matches maybe the change didn't get out in the release. |
I’m using 6.2.5
Eleanor Boyd ***@***.***>于2023年7月10日 周一下午12:50写道:
… Hi! Could you send your pytest version?
—
Reply to this email directly, view it on GitHub
<#21576 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEYOX7PW23HI4LY7MZ45HNTXPQXFZANCNFSM6AAAAAA2BCCWTM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hi! Looking into this now but if you upgrade your pytest version you should no longer experience this issue. Thanks |
I upgraded to 7.4 and it's still broken. This is what I get on
At least the test explorer populates, but when I click "refresh tests" I get an error notification When I try to run them using the test explorer, the test results pane pops up and says "Finished running tests!" but none have actually been run. On a side note, the Insiders test explorer seems to be broken a lot for Python...I usually use the command line for tests since it's broken so often. Even so, I'd like to be able to use the debugger more often. |
Hi! The error notification is microsoft/vscode#187770 and should be fixed now. The result panel saying "Finished running tests" and not having them run is likely a different problem. Could you check your logs and see if an error is seen there. In the meantime, we are releasing a new infrastructure which could be your problem at this point in time as we are working out issues coming from users. This rewrite is helping with old buggy behavior but is still experimental. You can opt out of the rewrite as I get this fix in by setting this in your **user **settings: |
Right. That error notification is now gone. But I still have "finished running tests" without tests being run. In Output->Python it says the new adapter is being used, and I don't see an error message in "Python", "Python Test Log", or "Python Language Server" when I try to run tests. Tests appear to be discovered correctly. When I opt out from the new test adapter, test discovery is broken. All that shows up is the |
understood- thanks for the info! Will investigate |
Hi, I am having the same issue described above:
I have:
The project I was experiencing this with was stored on a second disk, which I opened in VSCode using a symbolic link to my home directory.
I replicated a simple project (see below) on my local drive with only a tests directory and a virtual environment to test whether the issue was to do my with my project structure. The tests pass and the "Testing" panel UI is correctly updated. When I load the original project through its 'actual path' (i.e. not using the symlink, Perhaps this points to an issue with how the extension is resolving path names? Happy to provide any additional info. System Info
Test Project Structure
test_simple.py
settings.json
|
Hi @jonodhawkins thank you for the info! Looks like an issue with symlinks, which is something we know is broken. I am currently trying to fix it but having trouble repro-ing the behavior. To clarify your steps @jonodhawkins,
Thanks for your help! |
there are a few different issues about testing and symlinks so I want to consolidate the discussion to this one: #21373 if possible. Thanks |
Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off. Happy Coding! |
if anyone has repro steps please comment and I can reopen- thanks |
Type: Bug
Behaviour
Expected vs. Actual
I expect discovery to work, for the explorer to populate with tests. Instead I get
pytest discovery error (see Output > Python)
Steps to reproduce:
Diagnostic data
python.languageServer
setting: PylanceOutput for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)User Settings
Extension version: 2023.13.11871009
VS Code version: Code - Insiders 1.80.0-insider (5b7440441bbd2548a862f7321cafdfa1597132e5, 2023-06-30T21:12:14.732Z)
OS version: Windows_NT x64 10.0.22621
Modes:
Remote OS version: Linux x64 5.10.16.3-microsoft-standard-WSL2
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: