python_files如需要控制多测试用例脚本是可以使用空格隔开。
[pytest]
addopts = -s --alluredir report
testpaths = ./scripts/
python_files = test_*.py cc*.py
python_classes = Test*
python_functions = test_*
下过如下图:

testpaths同样也适用: 如需要执行scrips下或者其他文件路径下xx 可以使用。使用空格隔开
testpaths=./scripts/ ./xx/xx.py
本文详细介绍了如何使用pytest进行测试用例的配置,包括如何指定运行的测试脚本、类及函数等。通过设置不同参数,可以灵活地控制测试范围,如使用`python_files`指定多个测试脚本,使用`testpaths`指定测试文件路径。
2531

被折叠的 条评论
为什么被折叠?



