1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
# The test environment and commands
[tox]
envlist = check, test
skipsdist = True
[testenv:check]
description = Runs all formatting tools then static analysis (quick)
deps =
--no-deps
--requirement deps/check.txt
commands =
shed
flake8
; mypy --config-file=tox.ini src/hypothesmith/
[testenv:{py38-, py39-, py310-, py311-, py312-, py313-,}test]
description = Runs pytest with posargs - `tox -e test -- -v` == `pytest -v`
deps =
--no-deps
--requirement deps/test.txt
commands =
pip install --no-deps .
pytest {posargs:-n auto}
# Run `tox -e deps` to update pinned dependencies
[testenv:deps]
base_python = 3.10
description = Updates pinned dependencies in the `deps/*.txt` files
deps =
pip-tools
commands =
pip-compile --quiet --rebuild --upgrade --output-file=deps/check.txt deps/check.in
pip-compile --quiet --rebuild --upgrade --output-file=deps/test.txt deps/test.in setup.py
# Settings for other tools
[pytest]
addopts =
-Werror
--tb=short
--cov=hypothesmith
--cov-branch
--cov-report=term-missing:skip-covered
--cov-fail-under=100
[flake8]
ignore = D1,E501,W503,S101,S310
exclude = .*,__pycache__
[mypy]
python_version = 3.8
platform = linux
disallow_untyped_calls = True
disallow_untyped_defs = True
disallow_untyped_decorators = True
follow_imports = silent
ignore_missing_imports = True
warn_no_return = True
warn_return_any = True
warn_unused_ignores = True
warn_unused_configs = True
warn_redundant_casts = True
[mypy-tests.*]
ignore_errors = True
|