I am trying to run Django unit tests in the VSCode Test Explorer, also, I want the CodeLens 'Run Tests' button to appear above each test.
However, in the Test Explorer, When I press the Play button, an error displays: "No Tests were Ran" No Tests were Ran
My directory structure is:
- Workspace_Folder
- settings.json
- repo
- python_module_1
- sub_module
- tests
- test_a.py
- tests
- sub_module
- python_module_1
I am using the unittest framework. My Settings.json looks like this:
{
"python.pythonPath": "/Users/nbonilla/.local/share/virtualenvs/koku-iTLe243o/bin/python",
"python.testing.unittestArgs": [
"-v",
"-s",
"${workspaceFolder}/python_module_1/sub_module/"
],
"python.testing.pytestEnabled": false,
"python.testing.nosetestsEnabled": false,
"python.testing.unittestEnabled": true,
}
When I press the green "Play" button Test Explorer Play Button The Python Test Log Output shows the message "Unhandled exception in thread started by" Unhandled Exception in thread started by I am using a pipenv virtual environment. How do I run these Django Tests in the VSCode Test Explorer?
I saw that using pyTest is an alternative to unittest, how can this be set up easily as a replacement?