Codebase list natsort / upstream/7.1.1+git20210825.1.afe1226 tox.ini
upstream/7.1.1+git20210825.1.afe1226

Tree @upstream/7.1.1+git20210825.1.afe1226 (Download .tar.gz)

tox.ini @upstream/7.1.1+git20210825.1.afe1226raw · history · blame

# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.

[tox]
envlist =
    flake8, py35, py36, py37, py38, py39
# Other valid evironments are:
#   docs
#   release
#   clean
#   bump

# Don't error out if a user hasn't installed all python versions.
skip_missing_interpreters =
    true

[testenv]
passenv =
    WITH_EXTRAS
deps =
    coverage
    pytest
    pytest-cov
    pytest-mock
    hypothesis
    semver
extras =
    {env:WITH_EXTRAS:}
commands =
    # Doctests
    {envpython} -m doctest -o IGNORE_EXCEPTION_DETAIL docs/howitworks.rst
    pytest README.rst docs/examples.rst
    pytest --doctest-modules {envsitepackagesdir}/natsort
    # Full test suite. Allow the user to pass command-line objects.
    pytest --hypothesis-profile=slow-tests --tb=short --cov {envsitepackagesdir}/natsort --cov-report term-missing {posargs:}

# Check code quality.
[testenv:flake8]
deps =
    flake8
    flake8-import-order
    flake8-bugbear
    pep8-naming
    check-manifest
    twine
commands =
    {envpython} setup.py sdist bdist_wheel
    flake8
    check-manifest --ignore ".github*,*.md,.coveragerc"
    twine check dist/*
skip_install = true

# Build documentation.
# sphinx and sphinx_rtd_theme not in docs/requirements.txt because they
# will already be installed on readthedocs.
[testenv:docs]
deps =
    sphinx
    sphinx_rtd_theme
    -r docs/requirements.txt
commands =
    {envpython} setup.py build_sphinx
skip_install = true

# Bump version
[testenv:bump]
passenv =
    HOME
deps =
    bump2version
commands =
    {envpython} dev/bump.py {posargs:}
skip_install = true

# Release the code to PyPI
[testenv:release]
deps =
    twine
commands =
    {envpython} setup.py sdist --format=gztar bdist_wheel
    twine upload --skip-existing dist/*
skip_install = true

# Clean up the working directory
[testenv:clean]
deps =
commands = {envpython} dev/clean.py
skip_install = true

# Get GitHub actions to run the correct tox environment
[gh-actions]
python =
    3.5: py35
    3.6: py36
    3.7: py37
    3.8: py38
    3.9: py39