Learning to make a python package
Notes on setting up testing in VSCode
{
"python.pythonPath": "${workspaceFolder}/bin/python3",
// python.unitTest.unittestArgs are actually just the default here.
"python.unitTest.unittestArgs": [
"-v",
"-s",
".",
"-p",
"*test*.py"
],
"python.unitTest.unittestEnabled": true,
}
Add __init__.py
so that test can be found in packages (subfolders)
Make sure your test file has the word test
in it.
Tests are run automatically on commit. Check the output tab (CMD+SHIFT+U
)
Or, open your test file and Run Test
manually.