You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

VS Code Test Explorer类内测试运行按钮失效及跳转异常问题

问题:Docker容器内VS Code Test Explorer单个测试运行及跳转路径异常
  • 环境:MacOS Monterey M1 系统,通过VS Code连接远程Docker容器,使用Test Explorer插件
  • 测试运行异常:侧边栏中,测试类(如AppointmentAdminTest)的运行按钮可正常工作,但类内单个测试用例的运行按钮点击后无响应
  • 路径跳转异常:测试类的「跳转到测试」按钮能正确打开容器内路径/code/tests/test_admin.py(/code/为容器内的本地挂载卷路径),但类内单个测试用例的「跳转到测试」按钮会尝试打开本地主机路径/Users/*my-username*/.../tests/test_admin.py

当前我的pytest配置如下:

"python.testing.pytestArgs": [
    ".",
    "--no-cov",
    "-v",
    "-s",
    "--rootdir",
    "/code/"
]

内容的提问来源于stack exchange,提问作者dggtydnk

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.19 03:46:03