Newer
Older
NewLang / tox.ini
[tox]
requires = tox
labels =
    check = flake8, black, test
    ci = build, flake8, black_ci, test_ci, mutmut
env_list =
    flake8, black, test

[testenv:run]
description = Runs the project
use_develop = true
commands = python -m newlang {posargs}

[testenv:build]
description = Builds the project
deps =
    build
    wheel
commands = python -m build

[testenv:flake8]
description = Runs flake8
skip_install = true
deps = flake8
commands = flake8 {posargs:src tests}

[testenv:black]
description = Runs black
skip_install = true
deps = black
commands = black {posargs:src tests}

[testenv:black_ci]
description = Runs black in checking mode
deps = black
commands = black --check {posargs:src tests}

[testenv:test]
description = Tests the project
deps =
    pytest
    pytest-randomly
    pytest-xdist
    hypothesis
commands =
    pytest -q -n auto -x -l --sw --hypothesis-profile=dev {posargs}

[testenv:test_dev]
description = Tests the current source tree slowly
use_develop = true
deps =
    pytest
    pytest-randomly
    pytest-xdist
    hypothesis
commands =
    pytest -vv -n 0 -x -l --sw --hypothesis-profile=dev {posargs}

[testenv:test_ci]
description = Tests the project for a long time
deps =
    pytest
    pytest-randomly
    pytest-xdist
    hypothesis
commands =
    pytest -q -n auto -x -l --sw --hypothesis-profile=ci {posargs}

[testenv:mutmut]
description = Runs mutmut on the source tree
use_develop = true
deps =
    pytest
    pytest-randomly
    pytest-xdist
    hypothesis
    mutmut
commands =
    mutmut run --paths-to-mutate "src/parse2,src/newlang/i18n.py"
commands_post =
    mutmut results

[testenv:mutmut_ci]
description = Runs mutmut on the source tree without progress
use_develop = true
deps =
    pytest
    pytest-randomly
    pytest-xdist
    hypothesis
    mutmut
commands =
    mutmut run --no-progress --paths-to-mutate "src/parse2,src/newlang/i18n.py"
commands_post =
    mutmut results