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
47 changes: 1 addition & 46 deletions reframe/core/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#

__all__ = [
'parameterized_test', 'simple_test', 'required_version',
'simple_test', 'required_version',
'require_deps', 'run_before', 'run_after'
]

Expand All @@ -20,7 +20,6 @@
import traceback

import reframe.utility.osext as osext
import reframe.core.warnings as warn
from reframe.core.exceptions import (ReframeSyntaxError,
SkipTestError,
user_frame)
Expand Down Expand Up @@ -109,50 +108,6 @@ def simple_test(cls):
return cls


def parameterized_test(*inst):
'''Class decorator for registering multiple instantiations of a test class.

The decorated class must derive from
:class:`reframe.core.pipeline.RegressionTest`. This decorator is also
available directly under the :mod:`reframe` module.

:arg inst: The different instantiations of the test. Each instantiation
argument may be either a sequence or a mapping.

.. versionadded:: 2.13

.. note::
This decorator does not instantiate any test. It only registers them.
The actual instantiation happens during the loading phase of the test.

.. deprecated:: 3.6.0

Please use the :func:`~reframe.core.pipeline.RegressionTest.parameter`
built-in instead.

'''

warn.user_deprecation_warning(
'the @parameterized_test decorator is deprecated; '
'please use the parameter() built-in instead',
from_version='3.6.0'
)

def _do_register(cls):
_validate_test(cls)
if not cls.param_space.is_empty():
raise ValueError(
f'{cls.__qualname__!r} is already a parameterized test'
)

for args in inst:
_register_test(cls, args)

return cls

return _do_register


def required_version(*versions):
'''Class decorator for specifying the required ReFrame versions for the
following test.
Expand Down
11 changes: 0 additions & 11 deletions unittests/test_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,17 +164,6 @@ class MyTest(ExtendParams):
assert test.P2 is not None


@pytest.mark.filterwarnings(
'ignore::reframe.core.warnings.ReframeDeprecationWarning'
)
def test_parameterized_test_is_incompatible():
with pytest.raises(ValueError):
@rfm.parameterized_test(['var'])
class MyTest(TwoParams):
def __init__(self, var):
pass


def test_param_space_clash():
class Spam(rfm.RegressionMixin):
P0 = parameter([1])
Expand Down