-
Notifications
You must be signed in to change notification settings - Fork 29
/
tox.ini
76 lines (68 loc) · 1.97 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# 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 = flake8,black,doctests,py{36,311,312,313},cov
deps = -rrequirements.txt
skip_missing_interpreters = true
[gh-actions]
# splitting the subtests among each environment for speed reasons
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312
3.13: py313
[testenv:black]
deps =
black
commands = black --check --diff --fast .
[testenv:flake8]
deps =
flake8<6.0.0 # TODO remove pinned version once https://github.com/zheller/flake8-quotes/pull/111 is merged.
flake8-black
flake8-docstrings
flake8-quotes
pep8-naming
commands = flake8
[flake8]
# use 160 because some comments are too long
max-line-length = 160
max-complexity = 10
# isort and documentation flags, minor importance
ignore = I002,D100,D103,D104,D203,D204,D211,E402,Q000,W503
exclude = .ropeproject/,.tox/,venv/,version.py
[testenv:doctests]
# only run doctest on main modules to prevent parsing all files including
# setup.py which fails
commands =
py.test --doctest-modules openqa_review/
deps = -rrequirements.txt
pytest
pytest-doc
[testenv:cov]
# necessary to make cov find the .coverage file
# see http://stackoverflow.com/a/34706770/5031322
usedevelop = true
# Ignore exit code of first command as this will always fail
commands =
- py.test --cov=openqa_review --doctest-modules openqa_review/
py.test --cov=openqa_review --cov-append
# It seems we need to explicitly mention 'pika' here as dependency even though
# that should be already covered by setup.py. Not sure why this is needed
# though and only for 'cov'.
deps = -rrequirements.txt
pika
pytest
pytest-cov
pytest-mock
[testenv]
commands =
py.test
deps = -rrequirements.txt
pytest
pytest-mock