add pytest in makefile
This commit is contained in:
65
tox.ini
Normal file
65
tox.ini
Normal file
@@ -0,0 +1,65 @@
|
||||
[tox]
|
||||
envlist = py39,py310,py311,py312,py313,lint,coverage
|
||||
isolated_build = true
|
||||
|
||||
[testenv]
|
||||
deps =
|
||||
pytest>=7.0.0
|
||||
pytest-cov>=4.0.0
|
||||
pytest-asyncio>=0.21.0
|
||||
commands =
|
||||
pytest tests/ -v --cov=rustfs_s3_toolkit --cov-report=term-missing
|
||||
|
||||
[testenv:lint]
|
||||
deps =
|
||||
black>=23.0.0
|
||||
isort>=5.12.0
|
||||
flake8>=6.0.0
|
||||
mypy>=1.0.0
|
||||
commands =
|
||||
black --check src/ tests/ examples/
|
||||
isort --check-only src/ tests/ examples/
|
||||
flake8 src/ tests/ examples/
|
||||
mypy src/
|
||||
|
||||
[testenv:coverage]
|
||||
deps =
|
||||
pytest>=7.0.0
|
||||
pytest-cov>=4.0.0
|
||||
coverage[toml]>=7.0.0
|
||||
commands =
|
||||
pytest tests/ --cov=rustfs_s3_toolkit --cov-report=html --cov-report=xml --cov-fail-under=80
|
||||
|
||||
[testenv:format]
|
||||
deps =
|
||||
black>=23.0.0
|
||||
isort>=5.12.0
|
||||
commands =
|
||||
black src/ tests/ examples/
|
||||
isort src/ tests/ examples/
|
||||
|
||||
[flake8]
|
||||
max-line-length = 88
|
||||
extend-ignore = E203, W503
|
||||
exclude =
|
||||
.git,
|
||||
__pycache__,
|
||||
.tox,
|
||||
.venv,
|
||||
build,
|
||||
dist,
|
||||
*.egg-info
|
||||
|
||||
[coverage:run]
|
||||
source = src/
|
||||
omit =
|
||||
*/tests/*
|
||||
*/test_*
|
||||
*/__pycache__/*
|
||||
|
||||
[coverage:report]
|
||||
exclude_lines =
|
||||
pragma: no cover
|
||||
def __repr__
|
||||
raise AssertionError
|
||||
raise NotImplementedError
|
||||
Reference in New Issue
Block a user