Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/19.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 使用绝对路径配置pytest.ini_Python_Python 3.x_Pytest_Config_Ini - Fatal编程技术网

Python 使用绝对路径配置pytest.ini

Python 使用绝对路径配置pytest.ini,python,python-3.x,pytest,config,ini,Python,Python 3.x,Pytest,Config,Ini,我需要用一些绝对路径配置pytest.ini,如下所示 # pytest.ini [pytest] testpaths = C:\S1\Product\Baseline\PYTHON\lab\tests C:\S1\Product\Baseline\PYTHON\lab\template 但是,它似乎无法识别指定的路径。我错在哪里?你必须避开后斜杠(C:\\S1\\…)或使用前斜杠。它没有解决应该起作用的问题,我测试了它-你使用了什么?

我需要用一些绝对路径配置
pytest.ini
,如下所示

# pytest.ini
[pytest]
testpaths =
    C:\S1\Product\Baseline\PYTHON\lab\tests
    C:\S1\Product\Baseline\PYTHON\lab\template

但是,它似乎无法识别指定的路径。我错在哪里?

你必须避开后斜杠(
C:\\S1\\…
)或使用前斜杠。它没有解决应该起作用的问题,我测试了它-你使用了什么?