【发布时间】:2022-10-04 19:51:36
【问题描述】:
在其唯一内容为的文件中
def test_sanity():
pass
我正在尝试运行名为test_something.py 的文件。
文件夹结构是
uv_metadata
|---uv_metadata
|------tests
|----------test_something.py
得到错误
ssh://noam.s@ML:2202/home/noam.s/src/uv_metadata/venv/bin/python -u /home/noam.s/.pycharm_helpers/pycharm/_jb_pytest_runner.py --target test_something.py::test_sanity
Testing started at 14:34 ...
sh: 1: cd: can't cd to C:/Users/noam.s/src/uv_metadata/uv_metadata/tests
Launching pytest with arguments test_something.py::test_sanity --no-header --no-summary -q in /home/noam.s
============================= test session starts ==============================
collected 0 items
============================ no tests ran in 0.00s =============================
ERROR: file or directory not found: test_something.py::test_sanity
Process finished with exit code 4
Empty suite
我注意到sh: 1: cd: can't cd to C:/Users/noam.s/src/uv_metadata/uv_metadata/tests 这行没有意义。这是我的远程解释器的配置方式:
这只是停止工作,我不知道发生了什么变化。
如何让 Pycharm 再次识别测试文件夹?
【问题讨论】:
标签: python pycharm pytest remote-debugging