summaryrefslogtreecommitdiffstats
path: root/src/cephadm/tox.ini
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/cephadm/tox.ini62
1 files changed, 62 insertions, 0 deletions
diff --git a/src/cephadm/tox.ini b/src/cephadm/tox.ini
new file mode 100644
index 000000000..079605afc
--- /dev/null
+++ b/src/cephadm/tox.ini
@@ -0,0 +1,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"