34 lines
1.2 KiB
JSON
34 lines
1.2 KiB
JSON
{
|
|
// Prefer the local .venv interpreter for this workspace
|
|
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/Scripts/python.exe",
|
|
"python.venvPath": "${workspaceFolder}",
|
|
|
|
// Configure a custom PowerShell profile that activates the .venv automatically
|
|
"terminal.integrated.profiles.windows": {
|
|
"PowerShell (venv)": {
|
|
"path": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
|
|
"args": [
|
|
"-NoExit",
|
|
"-Command",
|
|
"if (Test-Path \"${workspaceFolder}\\.venv\\Scripts\\Activate.ps1\") { . \"${workspaceFolder}\\.venv\\Scripts\\Activate.ps1\" } else { Write-Host \".venv not found; run .\\tools\\run_with_venv.ps1 -Install to create it.\" }"
|
|
]
|
|
}
|
|
},
|
|
|
|
// Use the venv-powered PowerShell profile by default in this workspace
|
|
"terminal.integrated.defaultProfile.windows": "PowerShell (venv)"
|
|
}
|
|
{
|
|
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python",
|
|
"python.terminal.activateEnvironment": true,
|
|
"python.testing.unittestArgs": [
|
|
"-v",
|
|
"-s",
|
|
"./tests",
|
|
"-p",
|
|
"*test.py"
|
|
],
|
|
"python.testing.pytestEnabled": false,
|
|
"python.testing.unittestEnabled": true
|
|
}
|