-
Notifications
You must be signed in to change notification settings - Fork 28
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] test states not displayed #291
Comments
Same problem here |
On my side, some are fine; some do not show the state after the run. |
I was not able to easily reproduce this. Any code/repo example to share? @mayrholu Does |
@kondratyev-nv it happens to me directly with: https://github.com/oxsecurity/megalinter |
@bdovaz Thanks! I see most tests do not get the right test state in this repo. This is due to tests being defined in the parent class (LinterTestRoot) and the extension not being able to resolve the right test ID. Other tests (e.g., config_test) seems to be working fine for me. @MichalMazurek @mayrholu Are you using parent classes for tests as well? |
Sorry for the late reply! For me it happens even in the super simple case here: Project folder with only one file: Content:
|
@kondratyev-nv I'm experiencing this problem too. If I run my pytest unit tests in Test Explorer in VS Code, they "flash blue", then the icons are grayed out again. If I then look at Note that both successful and failed test results are not displayed; everything is just "gray" after the tests are run. |
@kondratyev-nv is there any additional output/info I can provide you with or test something to get this issue resolved? |
I have the same issue, any suggesting? |
I had the same problem, caused by the |
@Zetaeta Do you mean you opened the workspace in VS Code without the symlink? We do have a symlink in our path. I'll try opening the workspace tomorrow via the non-symlink path, and report back. |
@rcartmil Yes, I opened the workspace by navigating to the original non-symlinked path and everything started working (including the built in python test explorer, which not working was what caused me to install this extension in the first place). |
@Zetaeta Wow, you are amazing! This solved my problem too! You've certainly made my day! |
And just to be clear, both the original "Test Explorer" and this Python Test Adapter's "Test Explorer" are working now, same as you. |
Hi there, while the workaround is great, it’s not a longtime solution for the problem. Is there any plans on fixing this? Or any hints on where to look for the problem so I can give it a try? |
When using pytest the icons in the test explorer remain gray (no matter if tests fail or pass).
The output shows the following (I had to mask actual paths and names):
When I click on "Debug this test" the following output is shown in debug terminal:
Python version is 3.11.0 (also reproducable with 3.10.4 and 3.8.3).
Python Test Explorer version is 0.7.1
Running VSCode 1.74.0 on Linux (SuSE SLE15)
No problems when switching to unittest, however most of our test suite is designed for pytest.
Any help would be appreciated!
The text was updated successfully, but these errors were encountered: