forked from os-autoinst/openqa_review
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
61 lines (54 loc) · 1.54 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
# 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,doctests,py{27,34,36},cov
deps = -rrequirements.txt
skip_missing_interpreters = true
[travis]
# splitting the subtests among each environment for speed reasons
# TODO doctests fail to find modules on travis
python =
2.7: py27
3.4: flake8,py34
3.6: py36,cov
[testenv:flake8]
deps =
flake8
flake8-docstrings
pep8-naming
commands = flake8
[flake8]
max-line-length = 160
max-complexity = 10
# isort and documentation flags, minor importance
ignore = I002,D100,D103,D104,D203,D204,D211,E402
exclude = .ropeproject/,.tox/
[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
# TODO was trying to also call coverage on doctests but could not get it to
# work. 'py.test --doctest-modules' fails when combined with '--cov' and its
# individual call with '--cov-append' also did not show success
commands =
py.test --cov=openqa_review
deps = -rrequirements.txt
pytest
pytest-cov
pytest-mock
[testenv]
commands =
py.test
deps = -rrequirements.txt
pytest
pytest-mock