Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion unittests/resources/checks_unlisted/deps_complex.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(self):
self.keep_files = ['out.txt']

@property
@sn.sanity_function
@deferrable
def count(self):
return self._count

Expand Down
12 changes: 10 additions & 2 deletions unittests/test_deferrable.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import pytest
import reframe.utility.sanity as sn
from reframe.core.warnings import ReframeDeprecationWarning


def test_defer():
Expand All @@ -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.
Expand All @@ -40,7 +48,7 @@ def test_iter():
assert i == e


@sn.sanity_function
@sn.deferrable
def _add(a, b):
return a + b

Expand All @@ -57,7 +65,7 @@ def __init__(self):
self._value = 0

@property
@sn.sanity_function
@sn.deferrable
def value(self):
return self._value

Expand Down
2 changes: 1 addition & 1 deletion unittests/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def fake_check():
class _FakeCheck(rfm.RegressionTest):
pass

@sn.sanity_function
@sn.deferrable
def error():
raise BaseException

Expand Down
4 changes: 2 additions & 2 deletions unittests/test_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion unittests/test_sanity_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def __init__(self):
self._b = 1

@property
@sn.sanity_function
@sn.deferrable
def a(self):
return self._a

Expand Down