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 65 66 67 68
|
[tox]
min_version = 4
env_list =
pre-commit,
mypy,
py3{8,9,10,11,12,13},
py3{8,9,10,11,12,13}-cli,
coverage-report
[pkgenv]
pass_env = SETUPTOOLS_SCM_PRETEND_VERSION
[testenv]
package = wheel
wheel_build_env = .pkg
extras = tests
pass_env =
FORCE_COLOR
NO_COLOR
commands = pytest {posargs}
[testenv:py3{8,10,13}-cli]
deps = coverage[toml]
commands =
# Use -o only once, so we exercise both code paths.
coverage run -m hatch_fancy_pypi_readme tests/example_pyproject.toml -o {envtmpdir}{/}t.md
coverage run {envbindir}{/}hatch-fancy-pypi-readme tests/example_pyproject.toml
[testenv:pre-commit]
skip_install = true
deps = pre-commit
commands = pre-commit run --all-files
[testenv:mypy]
extras = tests
deps = mypy
commands = mypy src
[testenv:py31{0,3}]
deps = coverage[toml]
commands = coverage run -m pytest {posargs}
[testenv:coverage-report]
; Keep version in-sync with .python-version-default
base_python = python3.13
deps = coverage[toml]
skip_install = true
commands =
coverage combine
coverage report
[testenv:svg]
description = Refresh SVG, test running using Pipx.
deps = pipx
skip_install = true
allowlist_externals = npx
commands =
pipx run --no-cache --spec . hatch-fancy-pypi-readme tests/example_pyproject.toml -o {envtmpdir}{/}t.md
pipx run rich-cli --markdown --hyperlinks --export-svg rich-cli-out.svg --max-width 79 {envtmpdir}{/}t.md
npx --quiet svgo rich-cli-out.svg
|