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
5 changes: 0 additions & 5 deletions tests/calculations/arithmetic/test_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,11 @@
###########################################################################
"""Tests for the `ArithmeticAddCalculation` plugin."""

import pytest

from aiida import orm
from aiida.calculations.arithmetic.add import ArithmeticAddCalculation
from aiida.common import datastructures


@pytest.mark.requires_rmq
def test_add_default(fixture_sandbox, aiida_localhost, generate_calc_job):
"""Test a default `ArithmeticAddCalculation`."""
inputs = {
Expand Down Expand Up @@ -46,7 +43,6 @@ def test_add_default(fixture_sandbox, aiida_localhost, generate_calc_job):
assert input_written == f"echo $(({inputs['x'].value} + {inputs['y'].value}))\n"


@pytest.mark.requires_rmq
def test_add_custom_filenames(fixture_sandbox, aiida_localhost, generate_calc_job):
"""Test an `ArithmeticAddCalculation` with non-default input and output filenames."""
input_filename = 'custom.in'
Expand All @@ -71,7 +67,6 @@ def test_add_custom_filenames(fixture_sandbox, aiida_localhost, generate_calc_jo
assert calc_info.retrieve_list == [output_filename]


@pytest.mark.requires_rmq
def test_sleep(fixture_sandbox, aiida_localhost, generate_calc_job):
"""Test the ``metadata.options.sleep`` input."""
sleep = 5
Expand Down
3 changes: 0 additions & 3 deletions tests/calculations/test_stash.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
from aiida.plugins import CalculationFactory


@pytest.mark.requires_rmq
@pytest.mark.parametrize(
'operation_type,entry_point_name',
[
Expand Down Expand Up @@ -215,7 +214,6 @@ def create_unstash_source_node():
generate_calc_job(fixture_sandbox, 'core.unstash', unstash_input)


@pytest.mark.requires_rmq
@pytest.mark.parametrize('unstash_target_mode', [UnstashTargetMode.NewRemoteData, UnstashTargetMode.OriginalPlace])
def test_submit_custom_code(fixture_sandbox, aiida_localhost, generate_calc_job, tmp_path, unstash_target_mode):
"""Test the full functionality of the `StashCalculation` and `UnstashCalculation` with a custom code submission."""
Expand Down Expand Up @@ -369,7 +367,6 @@ def test_submit_custom_code(fixture_sandbox, aiida_localhost, generate_calc_job,


@pytest.mark.usefixtures('aiida_profile_clean')
@pytest.mark.requires_rmq
@pytest.mark.parametrize(
'unstash_target_mode', [UnstashTargetMode.OriginalPlace.value, UnstashTargetMode.NewRemoteData.value]
)
Expand Down
4 changes: 0 additions & 4 deletions tests/calculations/test_templatereplacer.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,10 @@

import io

import pytest

from aiida import orm
from aiida.common import datastructures


@pytest.mark.requires_rmq
def test_base_template(fixture_sandbox, aiida_localhost, generate_calc_job):
"""Test a base template that emulates the arithmetic add."""
entry_point_name = 'core.templatereplacer'
Expand Down Expand Up @@ -57,7 +54,6 @@ def test_base_template(fixture_sandbox, aiida_localhost, generate_calc_job):
assert input_written == f"echo $(({inputs['parameters']['x']} + {inputs['parameters']['y']}))"


@pytest.mark.requires_rmq
def test_file_usage(fixture_sandbox, aiida_localhost, generate_calc_job):
"""Test a base template that uses two files."""
file1_node = orm.SinglefileData(io.BytesIO(b'Content of file 1'))
Expand Down
5 changes: 0 additions & 5 deletions tests/calculations/test_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,10 @@

import os

import pytest

from aiida import orm
from aiida.common import datastructures


@pytest.mark.requires_rmq
def test_get_transfer(fixture_sandbox, aiida_localhost, generate_calc_job, tmp_path):
"""Test a default `TransferCalculation`."""
file1 = tmp_path / 'file1.txt'
Expand Down Expand Up @@ -64,7 +61,6 @@ def test_get_transfer(fixture_sandbox, aiida_localhost, generate_calc_job, tmp_p
assert sorted(calc_info.retrieve_list) == sorted(retrieve_list)


@pytest.mark.requires_rmq
def test_put_transfer(fixture_sandbox, aiida_localhost, generate_calc_job, tmp_path):
"""Test a default `TransferCalculation`."""
file1 = tmp_path / 'file1.txt'
Expand Down Expand Up @@ -197,7 +193,6 @@ def test_validate_transfer_inputs(aiida_localhost, tmp_path):
assert result == expected


@pytest.mark.requires_rmq
def test_integration_transfer(aiida_localhost, tmp_path):
"""Test a default `TransferCalculation`."""
from aiida.calculations.transfer import TransferCalculation
Expand Down
1 change: 0 additions & 1 deletion tests/cmdline/commands/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ def test_arrayshow(self):
assert res.exit_code == 0, 'The command did not finish correctly'


@pytest.mark.requires_rmq
class TestVerdiDataBands(DummyVerdiDataListable):
"""Testing verdi data core.bands."""

Expand Down
4 changes: 0 additions & 4 deletions tests/cmdline/commands/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,13 @@
import tempfile
import textwrap

import pytest

from aiida.cmdline.commands import cmd_run
from aiida.common.log import override_log_level


class TestVerdiRun:
"""Tests for `verdi run`."""

@pytest.mark.requires_rmq
def test_run_workfunction(self, run_cli_command):
"""Regression test for #2165

Expand Down Expand Up @@ -159,7 +156,6 @@ def test_no_autogroup(self, run_cli_command):
all_auto_groups = queryb.all()
assert len(all_auto_groups) == 0, 'There should be no autogroup generated'

@pytest.mark.requires_rmq
def test_autogroup_filter_class(self, run_cli_command):
"""Check if the autogroup is properly generated but filtered classes are skipped."""
from aiida.orm import AutoGroup, Node, QueryBuilder, load_node
Expand Down
18 changes: 0 additions & 18 deletions tests/engine/processes/calcjobs/test_calc_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ def _factory(**kwargs):
return _factory


@pytest.mark.requires_rmq
class DummyCalcJob(CalcJob):
"""`DummyCalcJob` implementation to test the calcinfo with container code."""

Expand All @@ -81,7 +80,6 @@ def prepare_for_submission(self, folder):
return calcinfo


@pytest.mark.requires_rmq
class FileCalcJob(CalcJob):
"""Example `CalcJob` implementation to test the `provenance_exclude_list` functionality.

Expand Down Expand Up @@ -119,7 +117,6 @@ def prepare_for_submission(self, folder):
return calcinfo


@pytest.mark.requires_rmq
class MultiCodesCalcJob(CalcJob):
"""`MultiCodesCalcJob` implementation to test the calcinfo with multiple codes set.

Expand Down Expand Up @@ -250,7 +247,6 @@ def define(cls, spec):
assert len(job_tmpl['codes_info'][0]['prepend_cmdline_params']) == expected


@pytest.mark.requires_rmq
@pytest.mark.usefixtures('chdir_tmp_path')
@pytest.mark.parametrize('parallel_run', [True, False])
def test_multi_codes_run_parallel(aiida_code_installed, file_regression, parallel_run):
Expand Down Expand Up @@ -279,7 +275,6 @@ def test_multi_codes_run_parallel(aiida_code_installed, file_regression, paralle
file_regression.check(content, extension='.sh')


@pytest.mark.requires_rmq
@pytest.mark.usefixtures('chdir_tmp_path')
@pytest.mark.parametrize('computer_use_double_quotes', [True, False])
def test_computer_double_quotes(
Expand Down Expand Up @@ -311,7 +306,6 @@ def test_computer_double_quotes(
file_regression.check(content, extension='.sh')


@pytest.mark.requires_rmq
@pytest.mark.usefixtures('chdir_tmp_path')
@pytest.mark.parametrize('code_use_double_quotes', [True, False])
def test_code_double_quotes(aiida_localhost, file_regression, code_use_double_quotes):
Expand All @@ -338,7 +332,6 @@ def test_code_double_quotes(aiida_localhost, file_regression, code_use_double_qu
file_regression.check(content, extension='.sh')


@pytest.mark.requires_rmq
@pytest.mark.usefixtures('chdir_tmp_path')
def test_containerized_code(file_regression, aiida_localhost):
"""Test the :class:`~aiida.orm.nodes.data.code.containerized.ContainerizedCode`."""
Expand Down Expand Up @@ -371,7 +364,6 @@ def test_containerized_code(file_regression, aiida_localhost):
file_regression.check(content, extension='.sh')


@pytest.mark.requires_rmq
@pytest.mark.usefixtures('chdir_tmp_path')
def test_containerized_code_wrap_cmdline_params(file_regression, aiida_localhost):
"""Test :class:`~aiida.orm.nodes.data.code.containerized.ContainerizedCode` with ``wrap_cmdline_params = True``."""
Expand Down Expand Up @@ -405,7 +397,6 @@ def test_containerized_code_wrap_cmdline_params(file_regression, aiida_localhost
file_regression.check(content, extension='.sh')


@pytest.mark.requires_rmq
@pytest.mark.usefixtures('chdir_tmp_path')
def test_containerized_code_withmpi_true(file_regression, aiida_localhost):
"""Test the :class:`~aiida.orm.nodes.data.code.containerized.ContainerizedCode` with ``withmpi=True``."""
Expand Down Expand Up @@ -438,7 +429,6 @@ def test_containerized_code_withmpi_true(file_regression, aiida_localhost):
file_regression.check(content, extension='.sh')


@pytest.mark.requires_rmq
@pytest.mark.usefixtures('chdir_tmp_path')
def test_portable_code(tmp_path, aiida_localhost):
"""Test run container code"""
Expand Down Expand Up @@ -484,7 +474,6 @@ def test_portable_code(tmp_path, aiida_localhost):
assert subsubcontent == 'sub dummy'


@pytest.mark.requires_rmq
class TestCalcJob:
"""Test for the `CalcJob` process sub class."""

Expand Down Expand Up @@ -855,7 +844,6 @@ def _generate_process(inputs=None):
return _generate_process


@pytest.mark.requires_rmq
@pytest.mark.usefixtures('override_logging')
def test_parse_insufficient_data(generate_process):
"""Test the scheduler output parsing logic in `CalcJob.parse`.
Expand Down Expand Up @@ -886,7 +874,6 @@ def test_parse_insufficient_data(generate_process):
assert log in logs


@pytest.mark.requires_rmq
@pytest.mark.usefixtures('override_logging')
def test_parse_non_zero_retval(generate_process):
"""Test the scheduler output parsing logic in `CalcJob.parse`.
Expand All @@ -906,7 +893,6 @@ def test_parse_non_zero_retval(generate_process):
assert 'could not parse scheduler output: return value of `detailed_job_info` is non-zero' in logs


@pytest.mark.requires_rmq
@pytest.mark.usefixtures('override_logging')
def test_parse_not_implemented(generate_process):
"""Test the scheduler output parsing logic in `CalcJob.parse`.
Expand Down Expand Up @@ -938,7 +924,6 @@ def test_parse_not_implemented(generate_process):
assert log in logs


@pytest.mark.requires_rmq
@pytest.mark.usefixtures('override_logging')
def test_parse_scheduler_excepted(generate_process, monkeypatch):
"""Test the scheduler output parsing logic in `CalcJob.parse`.
Expand Down Expand Up @@ -976,7 +961,6 @@ def raise_exception(*args, **kwargs):
assert log in logs


@pytest.mark.requires_rmq
@pytest.mark.parametrize(
('exit_status_scheduler', 'exit_status_retrieved', 'final'),
(
Expand Down Expand Up @@ -1046,7 +1030,6 @@ def parse_retrieved_output(_, __):
assert result.status == final


@pytest.mark.requires_rmq
def test_additional_retrieve_list(generate_process, fixture_sandbox):
"""Test the ``additional_retrieve_list`` option."""
process = generate_process()
Expand Down Expand Up @@ -1342,7 +1325,6 @@ def _parse_submit_output(self, *args):
assert node.exit_status == 418


@pytest.mark.requires_rmq
def test_restart_after_daemon_reset(get_calcjob_builder, daemon_client, submit_and_await):
"""Test that a job can be restarted when it is launched and the daemon is restarted.

Expand Down
8 changes: 0 additions & 8 deletions tests/engine/processes/workchains/test_restart.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ def test_get_process_handlers_by_priority(generate_work_chain, inputs, prioritie
]


@pytest.mark.requires_rmq
def test_excepted_process(generate_work_chain, generate_calculation_node):
"""Test that the workchain aborts if the sub process was excepted."""
process = generate_work_chain(SomeWorkChain, {})
Expand All @@ -103,7 +102,6 @@ def test_excepted_process(generate_work_chain, generate_calculation_node):
assert process.inspect_process() == engine.BaseRestartWorkChain.exit_codes.ERROR_SUB_PROCESS_EXCEPTED


@pytest.mark.requires_rmq
def test_killed_process(generate_work_chain, generate_calculation_node):
"""Test that the workchain aborts if the sub process was killed."""
process = generate_work_chain(SomeWorkChain, {})
Expand All @@ -112,7 +110,6 @@ def test_killed_process(generate_work_chain, generate_calculation_node):
assert process.inspect_process() == engine.BaseRestartWorkChain.exit_codes.ERROR_SUB_PROCESS_KILLED


@pytest.mark.requires_rmq
def test_unhandled_failure(generate_work_chain, generate_calculation_node):
"""Test the unhandled failure mechanism.

Expand All @@ -131,7 +128,6 @@ def test_unhandled_failure(generate_work_chain, generate_calculation_node):
)


@pytest.mark.requires_rmq
def test_unhandled_reset_after_success(generate_work_chain, generate_calculation_node):
"""Test `ctx.unhandled_failure` is reset to `False` in `inspect_process` after a successful process."""
process = generate_work_chain(SomeWorkChain, {})
Expand All @@ -145,7 +141,6 @@ def test_unhandled_reset_after_success(generate_work_chain, generate_calculation
assert process.ctx.unhandled_failure is False


@pytest.mark.requires_rmq
def test_unhandled_reset_after_handled(generate_work_chain, generate_calculation_node):
"""Test `ctx.unhandled_failure` is reset to `False` in `inspect_process` after a handled failed process."""
process = generate_work_chain(SomeWorkChain, {})
Expand All @@ -166,7 +161,6 @@ def test_unhandled_reset_after_handled(generate_work_chain, generate_calculation
assert process.ctx.unhandled_failure is False


@pytest.mark.requires_rmq
def test_run_process(generate_work_chain, generate_calculation_node, monkeypatch):
"""Test the `run_process` method."""

Expand Down Expand Up @@ -234,14 +228,12 @@ def setup(self):
self.ctx.inputs.parameters = self.ctx.inputs.parameters.get_dict()


@pytest.mark.requires_rmq
def test_results():
results, node = engine.launch.run_get_node(CustomBaseRestartWorkChain)
assert results['sub'].result.value == 1
assert node.exit_status == 11


@pytest.mark.requires_rmq
def test_wrap_bare_dict_inputs():
"""Test that ``BaseRestartWorkChain._wrap_bare_dict_inputs`` method works properly.

Expand Down
1 change: 0 additions & 1 deletion tests/engine/processes/workchains/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
ArithmeticAddCalculation = CalculationFactory('core.arithmetic.add')


@pytest.mark.requires_rmq
class TestRegisterProcessHandler:
"""Tests for the `process_handler` decorator."""

Expand Down
1 change: 0 additions & 1 deletion tests/engine/test_calcfunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def execution_counter_calcfunction(data):
return Int(data.value + 1)


@pytest.mark.requires_rmq
class TestCalcFunction:
"""Tests for calcfunctions.

Expand Down
2 changes: 1 addition & 1 deletion tests/engine/test_futures.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
from tests.utils import processes as test_processes


@pytest.mark.requires_rmq
class TestWf:
"""Test process futures."""

TIMEOUT = 5.0 # seconds

@pytest.mark.requires_rmq
def test_calculation_future_broadcasts(self):
"""Test calculation future broadcasts."""
manager = get_manager()
Expand Down
Loading