e5217e01a4
- assure we test triple-jobs-gerrit.py file - fix division by zero bug with above file - simplified tox.ini file - prevent accidental regression on CI by checking number of passed tests - removed test_molecule.py file which was the precursor of what later become pytest-molecule Change-Id: Id6ffb9df88a376bcd3c8a0d77b2d378fca8da115
50 lines
1.3 KiB
INI
50 lines
1.3 KiB
INI
[tox]
|
|
# keep py3 before py2 to assure they are preffered for envs like linters:
|
|
envlist = linters,py{37,36,35,27},molecule
|
|
minversion = 3.4.0
|
|
ignore_basepython_conflict = True
|
|
skip_missing_interpreters = True
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
setenv =
|
|
ANSIBLE_FORCE_COLOR=1
|
|
ANSIBLE_INVENTORY={toxinidir}/test/hosts.ini
|
|
ANSIBLE_NOCOWS=1
|
|
ANSIBLE_RETRY_FILES_ENABLED=0
|
|
ANSIBLE_STDOUT_CALLBACK=debug
|
|
PY_COLORS=1
|
|
VIRTUAL_ENV={envdir}
|
|
# Avoid 2020-01-01 warnings: https://github.com/pypa/pip/issues/6207
|
|
PYTHONWARNINGS=ignore:DEPRECATION::pip._internal.cli.base_command
|
|
PIP_DISABLE_PIP_VERSION_CHECK=1
|
|
TEST_PARAMS=--cov=emit_releases_file -k "not molecule"
|
|
molecule: TEST_PARAMS=-ra -k molecule
|
|
passenv =
|
|
ANSIBLE_*
|
|
CURL_CA_BUNDLE
|
|
DOCKER_*
|
|
MOLECULE_*
|
|
REQUESTS_CA_BUNDLE
|
|
SSH_AUTH_SOCK
|
|
SSL_CERT_FILE
|
|
TERM
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/requirements.txt
|
|
whitelist_externals =
|
|
bash
|
|
commands_pre =
|
|
pip install -q bindep
|
|
bindep test
|
|
commands =
|
|
python -m pytest --html={envlogdir}/reports.html --self-contained-html {tty:-s} {env:TEST_PARAMS} {posargs}
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:linters]
|
|
deps =
|
|
pre-commit>=1.20.0
|
|
commands =
|
|
python -m pre_commit run -a
|