vscode-python-test-adapter: Tests do not run
I have a couple of tests set up using pytest.
When I click play they go blue with the elipsis
But then return.
This appears to be happening on both my and my co-founders computers across multiple projects and appears to have started occurring sometime during last night (everything was working at 2000 GMT on Tuesday 16th March.
I can’t see that a new version has been released, but as it is happening on multiple computers across multiple projects I assume something external has changed.
setting.json looks like:
{
"python.pythonPath": "SOME_CONDA_ENVIROMENT",
"python.testing.pytestArgs": [
"remove-white-background"
],
"python.testing.unittestEnabled": false,
"python.testing.nosetestsEnabled": false,
"python.testing.pytestEnabled": true
}
The python test adapter log appears free of errors:
2021-03-17T11:34:37.107Z INFO pytest at 'project-name': Reading configuration for workspace project-name
2021-03-17T11:34:37.108Z DBG pytest at 'project-name': usingNewInterpreterStorage feature flag is 'true'
2021-03-17T11:34:37.108Z INFO pytest at 'project-name': Using auto-detected pythonPath SOME_CONDA_ENVIROMENT
2021-03-17T11:34:37.109Z INFO pytest at 'project-name': Running tests using python path 'SOME_CONDA_ENVIROMENT' in PROJECT_FOLDER
2021-03-17T11:34:37.109Z INFO pytest at 'project-name': Environment variables file PROJECT_FOLDER/.env does not exist
2021-03-17T11:34:37.113Z INFO pytest at 'project-name': Running pytest with arguments: --rootdir=PROJECT_FOLDER, --junitxml=/var/folders/kk/m58vb4996x10jnrg4n7kcchc0000gn/T/tmp-1272-buZvkt6qIWZI, --override-ini, junit_logging=all, --override-ini, junit_family=xunit1, folder-name
2021-03-17T11:34:37.113Z INFO pytest at 'project-name': Running pytest as a Python module
2021-03-17T11:34:42.571Z INFO pytest at 'project-name': Test execution completed
The tests run correctly with pytest .
Update
Errors can be caused to appear on uncompilable code.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 4
- Comments: 16 (3 by maintainers)
@farfalk I think this is might be another issue. Can you please post it as a new issue and add some more details, like testing framework (maybe plugins), some output from CLI run, and whether there are any weird messages in Python Test Adapter logs.
I’m still having this issue in vscode 1.56.2 running in WSLv1(Ubuntu 20.04.2 LTS), with extension version 0.6.8, using pytest 5.4.3. All tests turn blue and seemingly run, but they all turn grey at the end.
Tests work correctly in python extension test module and from terminal, as in above comments.
Sorry to reopen this 😦
Thank you for working hard @kondratyev-nv ❤️
No need to apologise! A short term work around has been identified.
I spent the last 3 hours trying to figure out the same issue. Looks like if the test is in the same directory as the workspace then the test will run, all other tests will turn “blue” and then “grey”, same as all reporters above. I am using 1.55 and insider with this issue. I remember last time I used 1.53 and it is working well. FYI