beets/tox.ini
Lars Kruse 3d308f9b6a build: remove version pin for Sphinx
In cf69cad56f the Sphinx version was pinned to "<4.4.0".

The issue at that time (a spurious warning) is described in:
  https://github.com/sphinx-doc/sphinx/issues/10112

The problematic check was removed in Sphinx v4.5:
  https://www.sphinx-doc.org/en/master/changes.html#id334

The issue of spurious warnings was finally fixed in v5.x:
  https://github.com/sphinx-doc/sphinx/pull/10137

Technically it would be suitable to add a negative version pin of Sphinx
for "4.4".
But that version is quite outdated and at least Debian never shipped
Sphinx v4.4 in a stable release.

We force sphinx to be at least v5 in order to fix an unrelated recent
compatibility requirement of `sphinxcontrib.applehelp`.
2024-01-15 12:00:53 +01:00

70 lines
1.5 KiB
INI

# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
envlist = py38-{cov,lint,mypy}, docs, format, format_check
[_test]
deps = .[test]
[_lint]
deps = .[lint]
files = beets beetsplug beet test setup.py docs
[_mypy]
deps =
.[mypy]
.[test]
[testenv]
deps =
{test,cov}: {[_test]deps}
lint: {[_lint]deps}
mypy: {[_mypy]deps}
passenv = INTEGRATION_TEST
commands =
test: python -bb -m pytest -rs {posargs}
cov: coverage run -m pytest -rs {posargs}
lint: python -m flake8 {posargs} {[_lint]files}
mypy: mypy -p beets -p beetsplug
mypy: mypy test
[testenv:docs]
basepython = python3.10
deps =
sphinx>=5
pydata_sphinx_theme
commands = sphinx-build -W -q -b html docs {envtmpdir}/html {posargs}
# checks all links in the docs
[testenv:links]
deps = sphinx
allowlist_externals = /bin/bash
commands = /bin/bash -c '! sphinx-build -b linkcheck docs {envtmpdir}/linkcheck | grep "broken\s"'
[testenv:int]
deps = {[_test]deps}
setenv = INTEGRATION_TEST = 1
passenv = GITHUB_ACTIONS
commands = python -bb -m pytest {posargs}
[testenv:format]
deps =
isort
black
skip_install = True
commands =
isort beets beetsplug test
black beets beetsplug test
[testenv:format_check]
deps =
isort
black
skip_install = True
commands =
isort beets beetsplug test --check
black beets beetsplug test --check