aiida.backends.tests.utils package¶
Submodules¶
Module that defines methods to mock an AiiDA instance complete with mock configuration and profile.
-
aiida.backends.tests.utils.configuration.
create_mock_profile
(name, repository_dirpath=None)[source]¶ Create mock profile for testing purposes.
Parameters: - name – name of the profile
- repository_dirpath – optional absolute path to use as the base for the repository path
-
aiida.backends.tests.utils.configuration.
temporary_config_instance
(*args, **kwds)[source]¶ Create a temporary AiiDA instance.
-
aiida.backends.tests.utils.configuration.
temporary_directory
(*args, **kwds)[source]¶ Create a temporary directory.
-
aiida.backends.tests.utils.configuration.
with_temp_dir
(function)[source]¶ Create a temporary directory for the duration of the wrapped function.
The path of the temporary directory is passed to the wrapped function via the ‘temp_dir’ parameter (which it must accept).
-
aiida.backends.tests.utils.configuration.
with_temporary_config_instance
(function)[source]¶ Create a temporary AiiDA instance for the duration of the wrapped function.
Test utility to import fixtures, such as export archives.
-
aiida.backends.tests.utils.fixtures.
import_archive_fixture
(filepath)[source]¶ Import a test fixture that is an AiiDA export archive
Parameters: filepath – the relative path of the archive file within the fixture directory
Utilities for testing components from the workflow engine
-
class
aiida.backends.tests.utils.processes.
AddProcess
(inputs=None, logger=None, runner=None, parent_pid=None, enable_persistence=True)[source]¶ Bases:
aiida.engine.processes.process.Process
A simple Process that adds two integers.
-
__abstractmethods__
= frozenset([])¶
-
__module__
= 'aiida.backends.tests.utils.processes'¶
-
_abc_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache_version
= 102¶
-
_abc_registry
= <_weakrefset.WeakSet object>¶
-
_node_class
¶ alias of
aiida.orm.nodes.process.workflow.workflow.WorkflowNode
-
-
class
aiida.backends.tests.utils.processes.
BadOutput
(inputs=None, logger=None, runner=None, parent_pid=None, enable_persistence=True)[source]¶ Bases:
aiida.engine.processes.process.Process
A Process that emits an output that isn’t an AiiDA Data type.
-
__abstractmethods__
= frozenset([])¶
-
__module__
= 'aiida.backends.tests.utils.processes'¶
-
_abc_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache_version
= 102¶
-
_abc_registry
= <_weakrefset.WeakSet object>¶
-
_node_class
¶ alias of
aiida.orm.nodes.process.workflow.workflow.WorkflowNode
-
-
class
aiida.backends.tests.utils.processes.
DummyProcess
(inputs=None, logger=None, runner=None, parent_pid=None, enable_persistence=True)[source]¶ Bases:
aiida.engine.processes.process.Process
A Process that does nothing when it runs.
-
__abstractmethods__
= frozenset([])¶
-
__module__
= 'aiida.backends.tests.utils.processes'¶
-
_abc_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache_version
= 102¶
-
_abc_registry
= <_weakrefset.WeakSet object>¶
-
_node_class
¶ alias of
aiida.orm.nodes.process.workflow.workflow.WorkflowNode
-
-
class
aiida.backends.tests.utils.processes.
ExceptionProcess
(inputs=None, logger=None, runner=None, parent_pid=None, enable_persistence=True)[source]¶ Bases:
aiida.engine.processes.process.Process
A Process that raises a RuntimeError when run.
-
__abstractmethods__
= frozenset([])¶
-
__module__
= 'aiida.backends.tests.utils.processes'¶
-
_abc_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache_version
= 102¶
-
_abc_registry
= <_weakrefset.WeakSet object>¶
-
_node_class
¶ alias of
aiida.orm.nodes.process.workflow.workflow.WorkflowNode
-
-
class
aiida.backends.tests.utils.processes.
WaitProcess
(inputs=None, logger=None, runner=None, parent_pid=None, enable_persistence=True)[source]¶ Bases:
aiida.engine.processes.process.Process
A Process that waits until it is asked to continue.
-
__abstractmethods__
= frozenset([])¶
-
__module__
= 'aiida.backends.tests.utils.processes'¶
-
_abc_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache_version
= 102¶
-
_abc_registry
= <_weakrefset.WeakSet object>¶
-
_node_class
¶ alias of
aiida.orm.nodes.process.workflow.workflow.WorkflowNode
-