我正在尝试调试 pytest。我想注入一个环境变量。这是我设置 launch.json 的方法
{
"type": "python",
"request": "test",
"name": "pytest",
"console": "integratedTerminal",
"env": {
"ENV_VAR":"RandomStuff"
}
},
Run Code Online (Sandbox Code Playgroud)
但当我开始调试时似乎。我没有看到注入的 env 变量,因此我的测试预计 env 变量失败。
我还注意到错误
Could not load unit test config from launch.json
Run Code Online (Sandbox Code Playgroud)