mirror of
https://github.com/beetbox/beets.git
synced 2025-12-14 20:43:41 +01:00
this allows to run INTEGRATION_TEST=1 tox -e <env> test/test_<module>.py which is very useful when testing locally. Otherwise, tox will clean the environment, such that INTEGRATION_TEST will not be passed to the test runner.
41 lines
1.1 KiB
INI
41 lines
1.1 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}, docs
|
|
|
|
[_test]
|
|
deps = .[test]
|
|
|
|
[_lint]
|
|
deps = .[lint]
|
|
files = beets beetsplug beet test setup.py docs
|
|
|
|
[testenv]
|
|
deps =
|
|
{test,cov}: {[_test]deps}
|
|
lint: {[_lint]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}
|
|
|
|
[testenv:docs]
|
|
basepython = python3.9
|
|
deps = sphinx<4.4.0
|
|
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}
|