From 5c0b340a4b76e4fa5063dfec25508c31fef2c613 Mon Sep 17 00:00:00 2001 From: Brian Maissy Date: Sun, 21 Jan 2018 22:43:00 +0200 Subject: [PATCH] Clarify that warning capturing doesn't change the warning filter by default --- changelog/2457.doc | 1 + doc/en/warnings.rst | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 changelog/2457.doc diff --git a/changelog/2457.doc b/changelog/2457.doc new file mode 100644 index 000000000..31d7aa1c2 --- /dev/null +++ b/changelog/2457.doc @@ -0,0 +1 @@ +Clarify that warning capturing doesn't change the warning filter by default. \ No newline at end of file diff --git a/doc/en/warnings.rst b/doc/en/warnings.rst index f249d7e3b..d5a627aea 100644 --- a/doc/en/warnings.rst +++ b/doc/en/warnings.rst @@ -112,6 +112,12 @@ decorator or to all tests in a module by setting the ``pytestmark`` variable: pytestmark = pytest.mark.filterwarnings('error') +.. note:: + + Except for these features, pytest does not change the python warning filter; it only captures + and displays the warnings which are issued with respect to the currently configured filter, + including changes to the filter made by test functions or by the system under test. + .. note:: ``DeprecationWarning`` and ``PendingDeprecationWarning`` are hidden by the standard library