File: tox.ini

package info (click to toggle)
python-w3lib 2.3.1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 396 kB
  • sloc: python: 3,141; makefile: 133
file content (53 lines) | stat: -rw-r--r-- 1,259 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# 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 = py39, py310, py311, py312, py313, pypy3.10, docs, pylint, typing, pre-commit, twinecheck

[testenv]
deps =
    pytest !=3.1.1, !=3.1.2
    pytest-cov
commands =
    python -m pytest \
        --doctest-modules \
        --cov=w3lib --cov-report=term --cov-report=xml \
        {posargs:w3lib tests}

[testenv:typing]
basepython = python3
deps =
    # mypy would error if pytest (or its stub) not found
    pytest
    mypy==1.14.1
commands =
    mypy --strict {posargs: w3lib tests}

[testenv:pylint]
deps =
    {[testenv]deps}
    pylint==3.3.3
commands =
    pylint conftest.py docs setup.py tests w3lib

[testenv:docs]
changedir = docs
deps = -rdocs/requirements.txt
commands =
    sphinx-build -W -b html . {envtmpdir}/html

[testenv:pre-commit]
deps = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure
skip_install = true

[testenv:twinecheck]
basepython = python3
deps =
    twine==6.1.0
    build==1.2.2.post1
commands =
    python -m build --sdist
    twine check dist/*