如何使pycharm从由pyscaffold创建的文件setup.cfg中获取测试配置?
我在设置中启用了pytest->工具->python集成工具->测试
到目前为止,我所拥有的是保存在Python测试部分的配置,其中包括:
目标:脚本路径=c:…\setup.py
附加参数:测试
但这就是我运行它时得到的:
[...] ERROR: file not found: test
或者,我如何在pycharm中复制与在setup.cfg中相同的测试配置?
console_scripts =
program = program.main:run
[test]
# py.test options when running `python setup.py test`
# addopts = --verbose
extras = True
[tool:pytest]
# Options for py.test:
# Specify command line options as you would do when invoking py.test directly.
# e.g. --cov-report html (or xml) for html/xml output or --junitxml junit.xml
# in order to write a coverage file that can be read by Jenkins.
addopts =
--cov reddit_users_info --cov-report term-missing
--verbose
[...]
testpaths = tests