[bdist_wheel]
universal = 0
[aliases]
test=pytest


[tool:pytest]
log_cli_level=debug
testpaths =
  tests
norecursedirs=dist build .tox scripts
addopts =
#   --cov-report=xml
  --cov-report=term-missing
#   --cov-report=html:test_coverage_report_html
#   --cov-report=annotate:test_coverage_annotated_source
  # Summarise failed tests at the end, including xfails and skips.
  -r fa
  ; -v


[tox:tox]
; envlist = py36,py39
; Only run test environment by default, so just running `tox` is fast
; and doesn't include the overhead of coverage or any other build
; pathways.
; This may not be the most effective way to do this, but it is the only way I
; could find.
envlist = test

[testenv]
deps =
    pytest
    pytest-cov
    pyhamcrest>=1.8.1
    PyQt5
; Pass args to pytest by including them in the tox call after a `--`, eg tox
; -- tests/test_something.py
commands = pytest {posargs}

[testenv:test]
deps = {[testenv]deps}
commands = pytest --no-cov {posargs}

[testenv:clean]
deps = coverage
skip_install = true
commands = coverage erase

[testenv:coverage]
deps = coverage
    {[testenv]deps}
setenv = COVERAGE_FILE = .coverage.{envname}
commands = pytest --cov={envsitepackagesdir}/autokey --cov-append {posargs}

[testenv:report]
deps = coverage
skip_install = true
commands =
    coverage combine
    coverage report
    coverage html
