| # 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 | |