执行 pytest 后,我可以看到它根据“pytest.ini”的路径填充结果中的 rootdir。我的问题是我需要使用相对路径来读取一些文件作为测试的一部分,所以有没有办法在测试执行期间获取这个“rootdir”参数值
python pytest
pytest ×1
python ×1