-
Notifications
You must be signed in to change notification settings - Fork 13
/
tox.ini
34 lines (29 loc) · 1.14 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
# tox (https://tox.readthedocs.io/) 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 = py37, py38, py39, py310, py311, pypy3, flake8, flake8-unittest
skip_missing_interpreters = true
[testenv]
commands = {envpython} setup.py install
{envpython} -m unittest discover -s tests
deps = -r requirements.txt
[testenv:flake8]
basepython = python
deps = flake8
commands = flake8 ksconf --max-line-length=120 \
--extend-exclude ksconf/_version.py \
--ignore E741 \
--per-file-ignores=ksconf/setup_entrypoints.py:E241
[testenv:flake8-unittest]
basepython = python
deps = flake8
# Extra stuff we can ignore for unittests, like really long lines, bad variable names (l)
commands = flake8 tests --ignore E501,E741
[pytest]
testpaths =
tests
filterwarnings =
# Can't seem to exclude TestWorkDir any other way, so we just filter out warning about it (which only pytest emits). Easier than renaming the class
ignore:.*test class 'TestWorkDir'.*:pytest.PytestCollectionWarning