-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[Bug]: pytest -s hangs #27176
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
I cannot reproduce this, it seems to work fine for me, though it did perhaps take a little extra time in the collection phase it seemed. (tested with python 3.11.4 pytest 7.4.0/7.4.2) |
Ok, thanks for trying. I'm working off my own install that took a few tries from the other issue; I'll try it on 3.11 in the codespaces later today |
I also can not reproduce this as a single line, but I can reproduce that vscode does not find our tests right. I see it running
does take longer than I was willing to wait. |
It is something about the parameterization in |
It looks like there is a way to detect being run in |
https://github.com/microsoft/vscode-python/tree/main/pythonFiles If I hack together the required files from the vscode-python plugin (the vscode_pytest Its not entirely surprising that things are breaking given that I'm not running it in vscode and dont have the relevant sockets listening, but it:
|
I think this is the service at the other end, it is reading in 1MB chunks, but is appending to an unbounded bytestring, so I don't actually see anything that should be wrong about crossing the 4MB boundary, actually. I think I would need to actually see what the error is, though I suspect the lack of |
This may be more sophisticated than I'm really capable of troubleshooting, but I can grok enough, so I'm going to try to hang on. For my edification, could you share how you're identifying these things?
This line down to L30 add a plugin, not sure if that's the one though? The local command that VSCode output runs when I try to populate the test explorer is
|
Running Traceback from keyboard interrupt
|
I was really frankensteining my environment by just copying individual files from the vscode-python repository into my working directory just to see if I could get anything similar and figure out if there was something happening there. (And running When I also stood up a dummy server (to just listen, and drop the data it reads on the floor), the plugin actually succeeded. But there is an infinite loop condition that is possible so that could be what is hanging. It happens when the listening service is offline. (Now why that would be offline, I do not know). At this point I've kind of exhausted what I think I can look into, it seems like it is at least probably caused by VSCode rather than anything we specifically do, though I'm not 100% sure on that. |
Ok cool, that makes sense. I think I'm catching up to seeing the socket issue, as I'm seeing from stdout redirect that it's identified all the tests. How were you able to jump to the Regardless, it looks like there's two issues: the |
Might this be related to (and fixed by) #27422? |
Hot diggity! Yes it is fixed :) Thanks |
hi, facing the same issue, is there an easy workaround ? should I install 3.9.0dev ? or is there an easy fix ? Thanks in advance ! |
Uh oh!
There was an error while loading. Please reload this page.
Bug summary
In a development install, running
pytest -s
hangs indefinitely. This causes VSCode's python test explorer to also hang indefinitely as it tries to populate the list of tests (it seems like it ignores settings.json for the command to populate the list). The behavior occurs when running a single test, e.g.Code for reproduction
Actual outcome
(keeps collecting indefinitely)
Expected outcome
Detects all tests
Additional information
No response
Operating system
Linux 6.2.0-34-generic; Ubuntu 22.04.1
Matplotlib Version
dev build on current master,
fcd5bb1a2b
Matplotlib Backend
agg
Python version
3.10.12
Jupyter version
N/A
Installation
None
The text was updated successfully, but these errors were encountered: