社区所有版块导航
Python
python开源   Django   Python   DjangoApp   pycharm  
DATA
docker   Elasticsearch  
aigc
aigc   chatgpt  
WEB开发
linux   MongoDB   Redis   DATABASE   NGINX   其他Web框架   web工具   zookeeper   tornado   NoSql   Bootstrap   js   peewee   Git   bottle   IE   MQ   Jquery  
机器学习
机器学习算法  
Python88.com
反馈   公告   社区推广  
产品
短视频  
印度
印度  
Py学习  »  pycharm

如何在pycharm中复制与setup.cfg中相同的测试配置?[复制品]

Robert Calceanu • 4 年前 • 415 次点击  

如何使pycharm从setup.cfg(pyscaffold创建的文件)获取测试配置?

我确实从设置启用了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
Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/40597
 
415 次点击