]> git.proxmox.com Git - ceph.git/blame - ceph/src/cephadm/tox.ini
import ceph quincy 17.2.4
[ceph.git] / ceph / src / cephadm / tox.ini
CommitLineData
9f95a23c 1[tox]
b3b6e05e
TL
2envlist =
3 py3
4 mypy
5 fix
6 flake8
7skipsdist = true
8requires = cython
9f95a23c 9
f67539c2
TL
10[flake8]
11max-line-length = 100
12inline-quotes = '
13ignore =
14 E501,
15 W503,
16exclude =
17 .tox,
18 .vagrant,
19 __pycache__,
20 *.pyc,
21 templates,
22 .eggs
23statistics = True
24
b3b6e05e
TL
25[autopep8]
26addopts =
27 --max-line-length {[flake8]max-line-length}
28 --ignore "{[flake8]ignore}"
29 --exclude "{[flake8]exclude}"
30 --in-place
31 --recursive
32 --ignore-local-config
33
9f95a23c 34[testenv]
9f95a23c
TL
35skip_install=true
36deps =
b3b6e05e 37 pyfakefs
9f95a23c 38 mock
b3b6e05e 39 pytest
9f95a23c
TL
40commands=pytest {posargs}
41
42[testenv:mypy]
43basepython = python3
2a845540 44deps =
20effc67
TL
45 mypy
46 -c{toxinidir}/../mypy-constrains.txt
f6b5b4d7 47commands = mypy --config-file ../mypy.ini {posargs:cephadm}
f67539c2 48
b3b6e05e
TL
49[testenv:fix]
50basepython = python3
51deps =
52 autopep8
53commands =
54 python --version
55 autopep8 {[autopep8]addopts} {posargs: cephadm}
56
f67539c2
TL
57[testenv:flake8]
58basepython = python3
20effc67 59allowlist_externals = bash
f67539c2
TL
60deps =
61 flake8
62 flake8-quotes
63commands =
64 flake8 --config=tox.ini {posargs:cephadm}
2a845540 65 bash -c "test $(grep 'docker.io' cephadm | wc -l) == 11"
33c7a0ef
TL
66# Downstream distributions may choose to alter this "docker.io" number,
67# to make sure no new references to docker.io are creeping in unnoticed.