aboutsummaryrefslogtreecommitdiffstats
path: root/tox.ini
blob: 49d3aac6957999afed447eb8f56f078e71a164a4 (plain) (blame)
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
[tox]
envlist = flake8

[testenv]
deps =
    -r{toxinidir}/requirements.txt
    -r{toxinidir}/test-requirements.txt
    python_magic
setenv =
    PYTHONPATH = {toxinidir}/tests
avocado_cmd =
    avocado run -p TESTLOCAL=true --max-parallel-tasks=1
stage_tests =
    tests/cleaner_tests \
    tests/collect_tests \
    tests/report_tests \
    tests/vendor_tests
foreman_tests =
    tests/product_tests/foreman

[testenv:flake8]
deps = flake8
commands = flake8

[testenv:pylint]
deps = pylint
commands = pylint --rcfile=tox.ini .

[testenv:unit_tests]
basepython = python3
setenv =
    PYTHONPATH = .
commands =
    avocado run tests/unittests

[testenv:stageone_tests]
basepython = python3
commands =
    {[testenv]avocado_cmd} -t stageone {posargs:[testenv]stage_tests}

[testenv:stagetwo_tests]
basepython = python3
sitepackages = True
commands =
    {[testenv]avocado_cmd} -t stagetwo {posargs:[testenv]stage_tests}

[testenv:foreman_tests]
basepython = python3
commands =
    {[testenv]avocado_cmd} -t foreman {posargs:[testenv]foreman_tests}

[testenv:nosetests]
basepython = python3
deps =
    {[testenv]deps}
    nose3
commands =
    nosetests -v --with-coverage --cover-package=sos tests/unittests --cover-html

[flake8]
exclude =
    .git,
    .tox,
    debian,
    docs

[pylint]
#    C0114, # missing-module-docstring
#    C0115, # missing-class-docstring
#    C0116, # missing-function-docstring
#    R0401, # cyclic-import
#    R0801, # duplicate-code
#    R0904, # too-many-public-methods
disable = all
enable =
    C0209, # consider-using-f-string
    C0411, # wrong-import-order
    E1101, # no-member
    R0912, # too-many-branches
    R0914, # too-many-locals
    R1725, # super-with-arguments
    W1404, # implicit-str-concat
    W4901, # deprecated-module
    W4902, # deprecated-method
    W4903  # deprecated-argument
max-line-length = 79
recursive = y
ignore =
    .git,
    .tox,
    debian