mirror of
https://github.com/Cockatrice/Magic-Spoiler.git
synced 2026-03-21 09:44:53 -05:00
57 lines
1.4 KiB
INI
57 lines
1.4 KiB
INI
[tox]
|
|
envlist = isort-inplace, black-inplace, mypy, lint
|
|
|
|
[testenv]
|
|
basepython = python3.7
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/requirements_test.txt
|
|
setenv = PYTHONPATH = {toxinidir}
|
|
passenv = PYTHONPATH = {toxinidir}
|
|
|
|
[testenv:black-inplace]
|
|
description = Run black and edit all files in place
|
|
skip_install = True
|
|
deps = black
|
|
commands = black magic_spoiler/
|
|
|
|
# Active Tests
|
|
[testenv:yapf-inplace]
|
|
description = Run yapf and edit all files in place
|
|
skip_install = True
|
|
deps = yapf
|
|
commands = yapf --in-place --recursive --parallel magic_spoiler/
|
|
|
|
[testenv:mypy]
|
|
description = mypy static type checking only
|
|
deps = mypy
|
|
commands = mypy {posargs:magic_spoiler/}
|
|
|
|
[testenv:lint]
|
|
description = Run linting tools
|
|
deps = pylint
|
|
commands = pylint magic_spoiler/ --rcfile=.pylintrc
|
|
|
|
# Inactive Tests
|
|
[testenv:yapf-check]
|
|
description = Dry-run yapf to see if reformatting is needed
|
|
skip_install = True
|
|
deps = yapf
|
|
# TODO make it error exit if there's a diff
|
|
commands = yapf --diff --recursive --parallel magic_spoiler/
|
|
|
|
[testenv:isort-check]
|
|
description = dry-run isort to see if imports need resorting
|
|
deps = isort
|
|
commands = isort --check-only
|
|
|
|
[testenv:isort-inplace]
|
|
description = Sort imports
|
|
deps = isort
|
|
commands = isort -rc magic_spoiler/
|
|
|
|
[testenv:unit]
|
|
description = Run unit tests with coverage and mypy type checking
|
|
extras = dev
|
|
deps = pytest
|
|
commands = pytest --cov=magic_spoiler {posargs:tests/}
|