Factor out build/test configuration from tox.ini file.

This commit is contained in:
Dan Helfman 2019-05-14 16:45:24 +00:00 committed by Gitea
commit 128be3c17d
3 changed files with 17 additions and 8 deletions

3
pyproject.toml Normal file
View file

@ -0,0 +1,3 @@
[tool.black]
line-length = 100
skip-string-normalization = true

View file

@ -1,2 +1,10 @@
[metadata] [metadata]
description-file=README.md description-file=README.md
[tool:pytest]
testpaths = tests
addopts = --cov-report term-missing:skip-covered --cov=borgmatic --ignore=tests/end-to-end
[flake8]
ignore = E501,W503
exclude = *.*/*

14
tox.ini
View file

@ -7,22 +7,20 @@ minversion = 3.10.0
usedevelop = True usedevelop = True
deps = -rtest_requirements.txt deps = -rtest_requirements.txt
whitelist_externals = sh whitelist_externals = sh
install_command =
# temporary work around for https://github.com/pypa/pip/issues/6434
python -m pip install --no-use-pep517 {opts} {packages}
commands = commands =
py.test --cov-report term-missing:skip-covered --cov=borgmatic --ignore=tests/end-to-end \ pytest
tests []
sh scripts/black sh scripts/black
flake8 . flake8 .
[testenv:black] [testenv:black]
basepython = python3.7 basepython = python3.7
commands = commands =
black --skip-string-normalization --line-length 100 . black .
[testenv:end-to-end] [testenv:end-to-end]
deps = -rtest_requirements.txt deps = -rtest_requirements.txt
commands = commands =
py.test tests/end-to-end [] pytest tests/end-to-end
[flake8]
ignore = E501,W503
exclude = *.*/*