From 3c231e39888f57362d16a99ca1f8f4f16d07bb1c Mon Sep 17 00:00:00 2001 From: Erik Olof Gunnar Andersson Date: Tue, 26 Mar 2019 23:02:02 -0700 Subject: [PATCH] Modernize tox This is an attempt to reduce the log spam when running Designate unit-tests. Change-Id: I03af83a10b633ea63364001add5354413b2c9358 --- tox.ini | 48 +++++++++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/tox.ini b/tox.ini index 205f69cfc..b9044cff0 100644 --- a/tox.ini +++ b/tox.ini @@ -1,31 +1,41 @@ [tox] -minversion = 2.0 +minversion = 2.3.2 envlist = py35,py27,py36,py37,flake8 skipsdist = True [testenv] -usedevelop = True -install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=master} {opts} {packages} -deps = -r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt setenv = + VIRTUAL_ENV={envdir} + LANGUAGE=C.UTF-8 + LC_ALL=C.UTF-8 + OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true} + OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true} + OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true} + OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:180} PYTHONDONTWRITEBYTECODE=1 -whitelist_externals = sh - find - rm + PYTHONWARNINGS=default::DeprecationWarning,ignore::DeprecationWarning:distutils,ignore::DeprecationWarning:site +passenv = + http_proxy + HTTP_PROXY + https_proxy + HTTPS_PROXY + no_proxy + NO_PROXY + OS_DEBUG +usedevelop = True +install_command = + pip install {opts} {packages} commands = find . -type f -name "*.py[c|o]" -delete rm -f .testrepository/times.dbm -passenv = http_proxy - HTTP_PROXY - https_proxy - HTTPS_PROXY - no_proxy - NO_PROXY - OS_DEBUG - OS_LOG_CAPTURE - OS_STDERR_CAPTURE - OS_STDOUT_CAPTURE +deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=master} + -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt +whitelist_externals = + sh + find + rm [testenv:py27] commands = @@ -172,7 +182,7 @@ ignore-path = .venv,.git,.tox,*designate/locale*,*lib/python*,*designate.egg*,ap # H105 don't use author tags. We use version control instead # H302 import only modules # H306 imports not in alphabetical order -# H328 old style class declaration, use new style (inherit from `object`) +# H238 old style class declaration, use new style (inherit from `object`) # H402 one line docstring needs punctuation # H404 multi line docstring should start with a summary # H405 multi line docstring summary not separated with an empty line