File: tox.ini

package info (click to toggle)
pytest-mypy-testing 0.1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 268 kB
  • sloc: python: 1,151; sh: 13; makefile: 2
file content (108 lines) | stat: -rw-r--r-- 2,386 bytes parent folder | download
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# SPDX-FileCopyrightText: David Fritzsche
# SPDX-License-Identifier: CC0-1.0

[tox]
isolated_build = True
envlist =
    py37-pytest{70,74}-mypy{10,14}
    {py38,py39,py310,py311,py312}-pytest{70,81}-mypy{10,18}
    py-pytest{70,81}-mypy{10,18}
    linting
minversion = 3.28


[testenv]
deps =
    -c constraints.in
    coverage[toml]
    pytest70: pytest~=7.0.1
    pytest71: pytest~=7.1.3
    pytest72: pytest~=7.2.2
    pytest74: pytest~=7.4.4
    pytest80: pytest~=8.0.2
    pytest80: pytest~=8.0.2
    pytest81: pytest==8.1.0  # to test with the yanked version
    mypy10: mypy==1.0.1
    mypy14: mypy==1.4.1  # last version to support Python 3.7
    mypy17: mypy==1.7.1
    mypy18: mypy==1.8.0
setenv =
    COVERAGE_FILE={toxinidir}/build/{envname}/coverage
commands =
    python -m coverage run --context "{envname}" -m pytest {posargs} --junitxml={toxinidir}/build/{envname}/junit.xml

[testenv:black]
basepython = python3.10
skip_install = True
deps =
    -c constraints.txt
    black
commands =
    python -m black --check --fast --diff {posargs} .

[testenv:flake8]
basepython = python3.10
skip_install = True
deps =
    -c constraints.txt
    flake8
    flake8-bugbear
    flake8-comprehensions
    flake8-html
    flake8-mutable
    flake8-pyi
    flake8-logging-format
commands =
    python -m flake8 {posargs}

[testenv:isort]
basepython = python3.10
skip_install = True
deps =
    -c constraints.txt
    isort
commands =
    python -m isort . --check {posargs}

[testenv:mypy]
basepython = python3.10
skip_install = True
deps =
    -cconstraints.txt
    mypy
    pytest
commands =
    mypy src tests

[testenv:linting]
basepython = python3.10
skip_install = True
deps =
    -cconstraints.txt
    {[testenv:black]deps}
    {[testenv:flake8]deps}
    {[testenv:isort]deps}
    {[testenv:mypy]deps}
commands =
    {[testenv:black]commands}
    {[testenv:flake8]commands}
    {[testenv:isort]commands}
    {[testenv:mypy]commands}

[testenv:lock-requirements]
basepython = python3.10
skip_install = True
deps =
    -cconstraints.txt
    pip-tools
allowlist_externals =
    sh
commands =
    sh ./lock-requirements.sh {posargs}

[tox:.package]
# note tox will use the same python version as under what tox is
# installed to package so unless this is python 3 you can require a
# given python version for the packaging environment via the
# basepython key
basepython = python3