summaryrefslogtreecommitdiffstats
path: root/src/cephadm/tox.ini
blob: 079605afcae928a458f56d07c63cd3fc21edbf00 (plain)
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
[tox]
envlist =
    py3
    mypy
    fix
    flake8
skipsdist = true

[flake8]
max-line-length = 100
inline-quotes = '
ignore =
    E501,
    W503,
exclude =
    .tox,
    .vagrant,
    __pycache__,
    *.pyc,
    templates,
    .eggs
statistics = True

[autopep8]
addopts =
    --max-line-length {[flake8]max-line-length}
    --ignore "{[flake8]ignore}"
    --exclude "{[flake8]exclude}"
    --in-place
    --recursive
    --ignore-local-config

[testenv]
skip_install=true
deps =
  pyfakefs == 5.0
  mock
  pytest
commands=pytest {posargs}

[testenv:mypy]
basepython = python3
deps = mypy==0.790
commands = mypy --config-file ../mypy.ini {posargs:cephadm}

[testenv:fix]
basepython = python3
deps =
    autopep8
commands =
    python --version
    autopep8 {[autopep8]addopts} {posargs: cephadm}

[testenv:flake8]
basepython = python3
allowlist_externals = bash
deps =
    flake8 == 5.0.4
    flake8-quotes
commands =
    flake8 --config=tox.ini {posargs:cephadm}
    bash -c "test $(grep 'docker.io' cephadm | wc -l) == 11"