summaryrefslogtreecommitdiff
path: root/tests/conftest.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2017-10-12 09:56:27 -0400
committerNed Batchelder <ned@nedbatchelder.com>2017-10-12 09:56:27 -0400
commitfdb394a789f334cd6a626faa98cf57beb9798d7f (patch)
tree9ab621d56a1c5c4ccddc221bb630f724db167102 /tests/conftest.py
parent0fa88cff17d379c18fb02d2274c8c513fa55a6ee (diff)
downloadpython-coveragepy-fdb394a789f334cd6a626faa98cf57beb9798d7f.tar.gz
Enable DeprecationWarnings during tests
Diffstat (limited to 'tests/conftest.py')
-rw-r--r--tests/conftest.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/conftest.py b/tests/conftest.py
new file mode 100644
index 0000000..a0c21a8
--- /dev/null
+++ b/tests/conftest.py
@@ -0,0 +1,18 @@
+# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
+# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
+
+"""
+Pytest auto configuration.
+
+This module is run automatically by pytest, to define and enable fixtures.
+"""
+
+import pytest
+import warnings
+
+
+@pytest.fixture(autouse=True)
+def set_warnings():
+ """Enable DeprecationWarnings during all tests."""
+ warnings.simplefilter("default")
+ warnings.simplefilter("once", DeprecationWarning)