diff --git a/unittests/resources/checks_unlisted/deps_complex.py b/unittests/resources/checks_unlisted/deps_complex.py index 96d5795563..b4c1617013 100644 --- a/unittests/resources/checks_unlisted/deps_complex.py +++ b/unittests/resources/checks_unlisted/deps_complex.py @@ -45,7 +45,7 @@ def __init__(self): self.keep_files = ['out.txt'] @property - @sn.sanity_function + @deferrable def count(self): return self._count diff --git a/unittests/test_deferrable.py b/unittests/test_deferrable.py index b60637e3f0..57a2744b73 100644 --- a/unittests/test_deferrable.py +++ b/unittests/test_deferrable.py @@ -5,6 +5,7 @@ import pytest import reframe.utility.sanity as sn +from reframe.core.warnings import ReframeDeprecationWarning def test_defer(): @@ -21,6 +22,13 @@ def test_evaluate(): assert 3 == sn.evaluate(3) +def test_depr_warn(): + with pytest.warns(ReframeDeprecationWarning): + @sn.sanity_function + def foo(): + pass + + def test_implicit_eval(): # Call to bool() on a deferred expression triggers its immediate # evaluation. @@ -40,7 +48,7 @@ def test_iter(): assert i == e -@sn.sanity_function +@sn.deferrable def _add(a, b): return a + b @@ -57,7 +65,7 @@ def __init__(self): self._value = 0 @property - @sn.sanity_function + @sn.deferrable def value(self): return self._value diff --git a/unittests/test_logging.py b/unittests/test_logging.py index caa374fb05..9256f4fd5f 100644 --- a/unittests/test_logging.py +++ b/unittests/test_logging.py @@ -30,7 +30,7 @@ def fake_check(): class _FakeCheck(rfm.RegressionTest): pass - @sn.sanity_function + @sn.deferrable def error(): raise BaseException diff --git a/unittests/test_pipeline.py b/unittests/test_pipeline.py index 5bcdd385dc..cb62e3f4fe 100644 --- a/unittests/test_pipeline.py +++ b/unittests/test_pipeline.py @@ -202,7 +202,7 @@ def test_hellocheck_build_remotely(hellotest, remote_exec_ctx): def test_hellocheck_local_prepost_run(hellotest, local_exec_ctx): - @sn.sanity_function + @sn.deferrable def stagedir(test): return test.stagedir @@ -1203,7 +1203,7 @@ def test_performance_var_evaluation(dummytest, sanity_file, # `check_performance()`. logfile = 'perf.log' - @sn.sanity_function + @sn.deferrable def extract_perf(patt, tag): val = sn.evaluate( sn.extractsingle(patt, perf_file, tag, float) diff --git a/unittests/test_sanity_functions.py b/unittests/test_sanity_functions.py index d6c744bdb6..fae7e6dea2 100644 --- a/unittests/test_sanity_functions.py +++ b/unittests/test_sanity_functions.py @@ -24,7 +24,7 @@ def __init__(self): self._b = 1 @property - @sn.sanity_function + @sn.deferrable def a(self): return self._a