summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Eduardo <jose.eduardo.gd@gmail.com>2019-07-19 16:22:22 +0100
committerJose Eduardo <jose.eduardo.gd@gmail.com>2019-07-19 16:22:22 +0100
commit91bf24dd1610d5f6ac5d4867457f0703046017d2 (patch)
treeedd6e2a48c1b71f2c85a51bfa2d11d029eeb7f37
parent40358ac82b948ea8377d5ca32b576def31b39a84 (diff)
downloadisodate-91bf24dd1610d5f6ac5d4867457f0703046017d2.tar.gz
Raise warnings produced by isodate as errors during tests
-rw-r--r--src/isodate/tests/__init__.py3
-rw-r--r--tox.ini2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/isodate/tests/__init__.py b/src/isodate/tests/__init__.py
index b1d46bd..7208cbd 100644
--- a/src/isodate/tests/__init__.py
+++ b/src/isodate/tests/__init__.py
@@ -29,6 +29,7 @@ Collect all test suites into one TestSuite instance.
'''
import unittest
+import warnings
from isodate.tests import (test_date, test_time, test_datetime, test_duration,
test_strf, test_pickle)
@@ -37,6 +38,8 @@ def test_suite():
'''
Return a new TestSuite instance consisting of all available TestSuites.
'''
+ warnings.filterwarnings("error", module=r"isodate(\..)*")
+
return unittest.TestSuite([
test_date.test_suite(),
test_time.test_suite(),
diff --git a/tox.ini b/tox.ini
index 16616ab..29d7b0a 100644
--- a/tox.ini
+++ b/tox.ini
@@ -3,6 +3,8 @@ envlist = py27,py34,py35,py36,pypy,pypy3,flake,cover
[testenv]
deps =
+setenv =
+ PYTHONWARNINGS = default
commands =
{envpython} setup.py test