From c5be801843f4d4283f14616fea2715ebeebe5857 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Thu, 15 Jul 2021 18:57:34 +0200 Subject: [PATCH] Fix sanity function deprecation unit test --- unittests/test_deferrable.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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():