Skip to content

Commit

Permalink
Add tox to pyproject
Browse files Browse the repository at this point in the history
  • Loading branch information
noemifrisina committed Aug 30, 2023
1 parent 96682b0 commit 14cc48c
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,28 @@ addopts = """
--cov=nexgen --cov-report=xml --cov-branch
"""
junit_family = "xunit2"
testpaths = "src tests"
testpaths = "src tests"

# tox must currently be configured via an embedded ini string
# See: https://github.com/tox-dev/tox/issues/999
[tool.tox]
legacy_tox_ini = """
[tox]
skipsdist=True
[testenv:{pre-commit,mypy,pytest,docs}]
# Don't create a virtualenv for the command, requires tox-direct plugin
direct = True
passenv = *
allowlist_externals =
pytest
pre-commit
mypy
sphinx-build
sphinx-autobuild
commands =
pytest: pytest {posargs}
mypy: mypy src tests --ignore-missing-imports --no-strict-optional {posargs}
pre-commit: pre-commit run --all-files {posargs}
docs: sphinx-{posargs:build -EW --keep-going} -T docs build/html
"""

0 comments on commit 14cc48c

Please sign in to comment.