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 reframe/core/buildsystems.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from reframe.core.exceptions import BuildSystemError


class BuildSystem:
class BuildSystem(abc.ABC):
"""The abstract base class of any build system.
Concrete build systems inherit from this class and must override the
Expand Down
8 changes: 2 additions & 6 deletions reframe/frontend/executors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def abort(self, cause=None):
self.fail((type(exc), exc, None))


class TaskEventListener:
class TaskEventListener(abc.ABC):
@abc.abstractmethod
def on_task_run(self, task):
"""Called whenever the run() method of a RegressionTask is called."""
Expand Down Expand Up @@ -320,7 +320,7 @@ def print_separator(check, prefix):
self._policy.exit()


class ExecutionPolicy:
class ExecutionPolicy(abc.ABC):
"""Base abstract class for execution policies.

An execution policy implements the regression check pipeline."""
Expand Down Expand Up @@ -369,7 +369,3 @@ def runcase(self, case):

if self.force_local:
case.check.local = True

@abc.abstractmethod
def getstats(self):
"""Return test case statistics of the run."""
4 changes: 3 additions & 1 deletion reframe/utility/versioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def __str__(self):
return base + '-dev%s' % self._dev_number


class _ValidatorImpl:
class _ValidatorImpl(abc.ABC):
"""Abstract base class for the validation of version ranges."""
@abc.abstractmethod
def validate(version):
Expand All @@ -81,6 +81,7 @@ class _IntervalValidator(_ValidatorImpl):
``validate`` returns ``True`` if a given version string is inside
the interval including the endpoints.
"""

def __init__(self, condition):
try:
min_version_str, max_version_str = condition.split('..')
Expand Down Expand Up @@ -108,6 +109,7 @@ class _RelationalValidator(_ValidatorImpl):
``<bool_operator><version>``, and its method ``validate`` returns
``True`` if a given version string satisfies the relation.
"""

def __init__(self, condition):
self._op_actions = {
">": lambda x, y: x > y,
Expand Down
2 changes: 1 addition & 1 deletion unittests/test_buildsystems.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from reframe.core.exceptions import BuildSystemError


class _BuildSystemTest:
class _BuildSystemTest(abc.ABC):
@abc.abstractmethod
def create_build_system(self):
pass
Expand Down
2 changes: 1 addition & 1 deletion unittests/test_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from unittests.fixtures import TEST_MODULES


class _TestModulesSystem:
class _TestModulesSystem(abc.ABC):
def setUp(self):
self.environ_save = EnvironmentSnapshot()
self.modules_system.searchpath_add(TEST_MODULES)
Expand Down
3 changes: 1 addition & 2 deletions unittests/test_schedulers.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from reframe.core.schedulers.slurm import SlurmNode


class _TestJob:
class _TestJob(abc.ABC):
def setUp(self):
self.workdir = tempfile.mkdtemp(dir='unittests')
self.testjob = self.job_type(
Expand Down Expand Up @@ -71,7 +71,6 @@ def setup_user(self, msg=None):

self.testjob.options += partition.access

@abc.abstractmethod
def assertScriptSanity(self, script_file):
"""Assert the sanity of the produced script file."""
with open(self.testjob.script_filename) as fp:
Expand Down