Closed Rizhiy closed 10 months ago
You can create your own configuration entries for that. E.g, create a .vscode/launch.json
like the following, or extend tthe dap.configurations.python list.
{
"version": "0.2.0",
"configurations": [
{
"type": "python",
"request": "launch",
"name": "Test all",
"module": "pytest"
},
{
"type": "python",
"request": "launch",
"name": "Test file",
"module": "pytest",
"args": [
"${file}"
]
}
]
}
Imho it's not worth having this built-in. test_class
and test_method
are different because they require figuring out the context.
Thanks
Would be great if
test_file
,test_dir
andtest_all
methods were added.test_file
-pytest <filename>
test_dir
-pytest <dirname filename>
test_all
-pytest .