[PATCH 10/11] tox: Rework warning infrastructure

Stephen Finucane stephen at that.guru
Mon Jun 25 05:55:56 AEST 2018


Python 3.5 and 3.5 introduce raise some warnings for libraries included
in stdlib. Silence these to keep the output clean.

Signed-off-by: Stephen Finucane <stephen at that.guru>
---
 tox.ini | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tox.ini b/tox.ini
index 4eef4c44..a190fa6f 100644
--- a/tox.ini
+++ b/tox.ini
@@ -16,12 +16,14 @@ setenv =
     DJANGO_SETTINGS_MODULE = patchwork.settings.dev
     PYTHONDONTWRITEBYTECODE = 1
     DJANGO_LIVE_TEST_SERVER_ADDRESS = localhost:9000-9200
+    py27: PYTHONWARNINGS = once,ignore::DeprecationWarning:distutils,ignore::PendingDeprecationWarning:distutils,ignore::ImportWarning:backports
+    py{34,35,36}:PYTHONWARNINGS = once,ignore::ResourceWarning:unittest.suite,ignore::DeprecationWarning:distutils,ignore::PendingDeprecationWarning:distutils,ignore::ImportWarning:backports
 passenv =
     http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
     PW_TEST_DB_TYPE PW_TEST_DB_USER PW_TEST_DB_PASS PW_TEST_DB_HOST
     PW_TEST_DB_PORT
 commands =
-    python -Wonce {toxinidir}/manage.py test --noinput '{posargs:patchwork}'
+    python {toxinidir}/manage.py test --noinput '{posargs:patchwork}'
 
 [testenv:bashate]
 deps = bashate>=0.5,<0.6
-- 
2.17.1



More information about the Patchwork mailing list