Skip to content

Commit c5be801

Browse files
author
Vasileios Karakasis
committed
Fix sanity function deprecation unit test
1 parent 7ae88a2 commit c5be801

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

unittests/test_deferrable.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# SPDX-License-Identifier: BSD-3-Clause
55

66
import pytest
7+
import reframe.core.warnings as warnings
78
import reframe.utility.sanity as sn
89
from reframe.core.warnings import ReframeDeprecationWarning
910

@@ -22,7 +23,8 @@ def test_evaluate():
2223
assert 3 == sn.evaluate(3)
2324

2425

25-
def test_depr_warn():
26+
def test_depr_warn(monkeypatch):
27+
monkeypatch.setattr(warnings, '_RAISE_DEPRECATION_ALWAYS', True)
2628
with pytest.warns(ReframeDeprecationWarning):
2729
@sn.sanity_function
2830
def foo():

0 commit comments

Comments
 (0)