diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2017-10-12 09:56:27 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2017-10-12 09:56:27 -0400 |
commit | f7a6f9ed9b69d3dc1fb0586b89f16eff37951b22 (patch) | |
tree | bb88634820550082111f18b2204ce5b0b6bb9b7a /tests/conftest.py | |
parent | f89277e1369bfaea7f70cf2471f7f6514c375146 (diff) | |
download | python-coveragepy-git-f7a6f9ed9b69d3dc1fb0586b89f16eff37951b22.tar.gz |
Enable DeprecationWarnings during tests
Diffstat (limited to 'tests/conftest.py')
-rw-r--r-- | tests/conftest.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 00000000..a0c21a84 --- /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) |