-
Notifications
You must be signed in to change notification settings - Fork 2
/
tox.ini
59 lines (49 loc) · 1.77 KB
/
tox.ini
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
# Copyright (c) 2020 Hong Xu <hong@topbug.net>
# This file is part of flake8-executable.
# flake8-executable is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
# flake8-executable is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
# for more details.
# You should have received a copy of the GNU Lesser General Public License
# along with flake8-executable. If not, see <https://www.gnu.org/licenses/>.
[tox]
minversion = 3.20
envlist = py{37,38,39,310,311}-{linux,macos,windows}
skipsdist = True
[testenv]
download = True
usedevelop = True
platform = linux: linux
macos: darwin
windows: win32
setenv =
linux: PLATFORM = linux
macos: PLATFORM = macos
windows: PLATFORM = windows
[testenv:py{37,38,39,310,311}-{linux,macos,windows}]
deps = -rrequirements/test.txt
setenv =
{[testenv]setenv}
COVERAGE_RCFILE = {envtmpdir}/coveragerc
commands_pre =
{envpython} -c 'from pathlib import Path; Path(r"{env:COVERAGE_RCFILE}").write_text(Path(".coveragerc.in").read_text().format(platform="{env:PLATFORM}"))'
commands =
coverage run -m pytest -v
coverage report
[testenv:lint]
deps = -rrequirements/lint.txt
commands =
flake8 .
bandit -r .
mypy flake8_executable
[testenv:dev]
description = development environment with all deps at {envdir}
deps = -rrequirements-dev.txt
commands = python -c "print(r'{envpython}')"
[flake8]
max-line-length = 120
exclude = .eggs,.git,__pycache__,to-be-tested,.tox