加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
tox.ini 1.51 KB
一键复制 编辑 原始数据 按行查看 历史
Simone Basso 提交于 2021-06-15 19:46 . Enable branch coverage (#1542)
[tox]
envlist =
lint
py36
py37
py38
py39
pypy3
minversion = 3.14.2
requires =
virtualenv >= 20.4.5
pip >= 21.1.1
[testenv]
passenv =
LC_ALL
LANG
HOME
commands =
pip install -e .
pytest --cov=cookiecutter --cov-report=term --cov-fail-under=100 --cov-branch {posargs:tests}
cov-report: coverage html
cov-report: coverage xml
deps = -rtest_requirements.txt
skip_install = true
[testenv:lint]
commands =
python -m pre_commit run {posargs:--all}
deps = pre-commit>=1.20.0
usedevelop = false
[testenv:docs]
commands =
pip install -e .
pip install -r test_requirements.txt
pip install -r docs/requirements.txt
make docs
whitelist_externals = make
[testenv:safety]
commands =
safety check --full-report
deps =
safety
[testenv:packaging]
description =
Build package, verify metadata, install package and assert behavior when ansible is missing.
deps =
build
twine
skip_install = true
commands =
{envpython} -c 'import os.path, shutil, sys; \
dist_dir = os.path.join("{toxinidir}", "dist"); \
os.path.isdir(dist_dir) or sys.exit(0); \
print("Removing \{!s\} contents...".format(dist_dir), file=sys.stderr); \
shutil.rmtree(dist_dir)'
# build using moder python build (PEP-517)
{envpython} -m build \
--sdist \
--wheel \
--outdir {toxinidir}/dist/ \
{toxinidir}
# Validate metadata using twine
twine check {toxinidir}/dist/*
# Install the wheel
sh -c "python3 -m pip install {toxinidir}/dist/*.whl"
whitelist_externals = sh
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化