2018-04-19 12:33:14 -04:00
|
|
|
[tox]
|
2019-05-15 14:46:53 -04:00
|
|
|
envlist = py27, py36, py37, flake8
|
2018-04-19 12:33:14 -04:00
|
|
|
|
|
|
|
|
[travis]
|
|
|
|
|
python =
|
2019-05-15 14:46:53 -04:00
|
|
|
3.7: py37
|
2018-04-19 12:33:14 -04:00
|
|
|
3.6: py36
|
|
|
|
|
2.7: py27
|
|
|
|
|
|
|
|
|
|
[testenv:flake8]
|
|
|
|
|
basepython = python
|
|
|
|
|
deps = flake8
|
2018-04-23 12:08:06 -04:00
|
|
|
pip
|
2018-04-24 19:09:01 -04:00
|
|
|
commands = flake8 ansible_galaxy_cli ansible_galaxy
|
2018-04-19 12:33:14 -04:00
|
|
|
|
|
|
|
|
[testenv]
|
|
|
|
|
setenv =
|
|
|
|
|
PYTHONPATH = {toxinidir}
|
|
|
|
|
deps =
|
2018-04-23 12:08:06 -04:00
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
|
-r{toxinidir}/requirements_test.txt
|
|
|
|
|
|
|
|
|
|
commands = py.test --basetemp={envtmpdir}
|
2018-04-19 12:33:14 -04:00
|
|
|
|
2018-04-19 13:22:32 -04:00
|
|
|
[flake8]
|
|
|
|
|
max-line-length = 160
|
2018-04-24 19:09:01 -04:00
|
|
|
# ignore the stuff borrowed from ansible/ansible for now
|
2018-04-19 12:33:14 -04:00
|
|
|
|
2018-04-23 12:08:06 -04:00
|
|
|
[pytest]
|
2018-04-23 14:56:57 -04:00
|
|
|
# addopts = --full-trace
|
2018-04-23 12:08:06 -04:00
|
|
|
|
|
|
|
|
# captured logs will be show for failed tests by default.
|
|
|
|
|
# To also see captured logs for passing tests, try: pytest --log-level=DEBUG -r fEsxXpP
|
|
|
|
|
|
|
|
|
|
# default log_format = %(asctime)s %(levelname)s %(message)s
|
|
|
|
|
log_format = [%(asctime)s %(levelname)-0.1s] %(name)s %(filename)s %(funcName)s:%(lineno)d - %(message)s
|
|
|
|
|
|
|
|
|
|
# pytest defaults date_format="%H:%M:%S" to use logging default (asctime) we need to unset log_date_format
|
|
|
|
|
log_date_format =
|
2018-04-23 14:56:57 -04:00
|
|
|
|
|
|
|
|
[coverage:run]
|
|
|
|
|
branch = True
|
|
|
|
|
source = ansible_galaxy, ansible_galaxy_cli
|
2018-06-18 12:47:30 -04:00
|
|
|
omit =
|
|
|
|
|
# stuff from ansible/ansible that we use but dont have our own tests for
|
|
|
|
|
ansible_galaxy/utils/text.py
|