summaryrefslogtreecommitdiff
path: root/tests/conftest.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/conftest.py')
-rw-r--r--tests/conftest.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/conftest.py b/tests/conftest.py
index 4470b751..ecfeaf24 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -10,9 +10,23 @@ This module is run automatically by pytest, to define and enable fixtures.
import pytest
import warnings
+from coverage import env
+
@pytest.fixture(autouse=True)
def set_warnings():
"""Enable DeprecationWarnings during all tests."""
warnings.simplefilter("default")
warnings.simplefilter("once", DeprecationWarning)
+
+ # A warning to suppress:
+ # setuptools/py33compat.py:54: DeprecationWarning: The value of convert_charrefs will become
+ # True in 3.5. You are encouraged to set the value explicitly.
+ # unescape = getattr(html, 'unescape', html_parser.HTMLParser().unescape)
+ warnings.filterwarnings(
+ "ignore",
+ category=DeprecationWarning,
+ message="The value of convert_charrefs will become True in 3.5.",
+ )
+ if env.PYPY:
+ warnings.filterwarnings("ignore", r".*unclosed file", category=ResourceWarning)