Files @ 9293b6b67ca7
Branch filter:

Location: gimmecert/tox.ini

branko
GC-45: Update development-related requirements:

- Dropped ability to run setup.py test command (deprecation).
- Updated documentation for tox invocations.
- Updated all test and development-related requirements.
- Dropped use of deprecated project pytest-runner.
- Updated tox configuration (deprecations).
- Unfortunately, tox seems to mess with the COLUMNS environment
variable that breaks functional tests which depend on specific
formatting of help (breaklines included). Make sure the tests run
with column width of 80.
[tox]
envlist = {py38,py39},lint,doc

[testenv]
allowlist_externals =
  make

basepython =
  doc: python3
  lint: python3
  py38: python3.8
  py39: python3.9

deps =
  .[test]

setenv =
  # Force column width for functional tests since they depend on
  # predictable output format.
  COLUMNS=80

commands =
  # Must specify cov-report explicitly, otherwise coverage starts
  # going through the tests as well.
  pytest --cov --cov-report=term-missing:skip-covered --basetemp={envtmpdir} tests/ functional_tests/

[testenv:lint]
deps =
  .[testlint]
commands =
  flake8

[testenv:doc]
deps =
  .[doc]
setenv =
  # Override Sphinx build directory so we do not trample over user's
  # build in source directory.
  BUILDDIR={envtmpdir}/docs_build
commands =
  # Easier to run than changing directory with separate comand. -e
  # will ensure the BUILDDIR gets picked-up and overrides the Makefile
  # content.
  make -C docs/ -e html