diff --git a/unittests/test_deferrable.py b/unittests/test_deferrable.py index 57a2744b73..6149165e2e 100644 --- a/unittests/test_deferrable.py +++ b/unittests/test_deferrable.py @@ -4,6 +4,7 @@ # SPDX-License-Identifier: BSD-3-Clause import pytest +import reframe.core.warnings as warnings import reframe.utility.sanity as sn from reframe.core.warnings import ReframeDeprecationWarning @@ -22,7 +23,8 @@ def test_evaluate(): assert 3 == sn.evaluate(3) -def test_depr_warn(): +def test_depr_warn(monkeypatch): + monkeypatch.setattr(warnings, '_RAISE_DEPRECATION_ALWAYS', True) with pytest.warns(ReframeDeprecationWarning): @sn.sanity_function def foo():