]> git.proxmox.com Git - ceph.git/blob - ceph/src/cephadm/tox.ini
095bced7a74feb165908d9d70d86b261e6593992
[ceph.git] / ceph / src / cephadm / tox.ini
1 [tox]
2 envlist =
3 py3
4 mypy
5 fix
6 flake8
7 skipsdist = true
8 requires = cython
9
10 [flake8]
11 max-line-length = 100
12 inline-quotes = '
13 ignore =
14 E501,
15 W503,
16 exclude =
17 .tox,
18 .vagrant,
19 __pycache__,
20 *.pyc,
21 templates,
22 .eggs
23 statistics = True
24
25 [autopep8]
26 addopts =
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
34 [testenv]
35 skip_install=true
36 deps =
37 pyfakefs
38 mock
39 pytest
40 commands=pytest {posargs}
41
42 [testenv:mypy]
43 basepython = python3
44 deps =
45 mypy
46 -c{toxinidir}/../mypy-constrains.txt
47 commands = mypy --config-file ../mypy.ini {posargs:cephadm}
48
49 [testenv:fix]
50 basepython = python3
51 deps =
52 autopep8
53 commands =
54 python --version
55 autopep8 {[autopep8]addopts} {posargs: cephadm}
56
57 [testenv:flake8]
58 basepython = python3
59 allowlist_externals = bash
60 deps =
61 flake8
62 flake8-quotes
63 commands =
64 flake8 --config=tox.ini {posargs:cephadm}
65 bash -c "test $(grep 'docker.io' cephadm | wc -l) == 11"
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.