aiida.backends.tests.engine package¶
Submodules¶
Tests for the calcfunction decorator and CalcFunctionNode.
-
class
aiida.backends.tests.engine.test_calcfunctions.
TestCalcFunction
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests for calcfunctions.
-
__module__
= 'aiida.backends.tests.engine.test_calcfunctions'¶
-
test_calcfunction_caching_change_code
()[source]¶ Verify that changing the source codde of a calcfunction invalidates any existing cached nodes.
-
test_calcfunction_default_linkname
()[source]¶ Verify that a calcfunction that returns a single Data node gets a default link label.
-
test_calcfunction_do_not_store_provenance
()[source]¶ Run the function without storing the provenance.
-
test_calcfunction_links
()[source]¶ Verify that a calcfunction can only get CREATE links and no RETURN links.
-
test_calcfunction_node_type
()[source]¶ Verify that a calcfunction gets a CalcFunctionNode as node instance.
-
test_calcfunction_return_stored
()[source]¶ Verify that a calcfunction will raise when a stored node is returned.
-
-
class
aiida.backends.tests.engine.test_class_loader.
TestCalcJob
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.engine.test_class_loader'¶
-
-
class
aiida.backends.tests.engine.test_daemon.
TestDaemon
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.engine.test_daemon'¶
-
-
class
aiida.backends.tests.engine.test_futures.
TestWf
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
TIMEOUT
= datetime.timedelta(seconds=5)¶
-
__module__
= 'aiida.backends.tests.engine.test_futures'¶
-
-
class
aiida.backends.tests.engine.test_launch.
AddWorkChain
(inputs=None, logger=None, runner=None, enable_persistence=True)[source]¶ Bases:
aiida.engine.processes.workchains.workchain.WorkChain
-
__abstractmethods__
= frozenset({})¶
-
__module__
= 'aiida.backends.tests.engine.test_launch'¶
-
_abc_impl
= <_abc_data object>¶
-
-
class
aiida.backends.tests.engine.test_launch.
TestLaunchers
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.engine.test_launch'¶
-
-
class
aiida.backends.tests.engine.test_launch.
TestLaunchersDryRun
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Test the launchers when performing a dry-run.
-
__module__
= 'aiida.backends.tests.engine.test_launch'¶
-
Tests for the classes in aiida.engine.processes.calcjobs.manager.
-
class
aiida.backends.tests.engine.test_manager.
TestJobManager
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Test the aiida.engine.processes.calcjobs.manager.JobManager class.
-
__module__
= 'aiida.backends.tests.engine.test_manager'¶
-
-
class
aiida.backends.tests.engine.test_manager.
TestJobsList
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Test the aiida.engine.processes.calcjobs.manager.JobsList class.
-
__module__
= 'aiida.backends.tests.engine.test_manager'¶
-
-
class
aiida.backends.tests.engine.test_persistence.
TestAiiDAPersister
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.engine.test_persistence'¶
-
maxDiff
= 1024¶
-
-
class
aiida.backends.tests.engine.test_persistence.
TestProcess
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Test the basic saving and loading of process states.
-
__module__
= 'aiida.backends.tests.engine.test_persistence'¶
-
Tests for process spec ports.
-
class
aiida.backends.tests.engine.test_ports.
TestInputPort
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests for the InputPort class.
-
__module__
= 'aiida.backends.tests.engine.test_ports'¶
-
-
class
aiida.backends.tests.engine.test_ports.
TestPortNamespace
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests for the PortNamespace class.
-
__module__
= 'aiida.backends.tests.engine.test_ports'¶
-
test_serialize_type_check
()[source]¶ Test that serialize will include full port namespace in exception message.
-
-
class
aiida.backends.tests.engine.test_process.
NameSpacedProcess
(inputs=None, logger=None, runner=None, parent_pid=None, enable_persistence=True)[source]¶ Bases:
aiida.engine.processes.process.Process
-
__abstractmethods__
= frozenset({})¶
-
__module__
= 'aiida.backends.tests.engine.test_process'¶
-
_abc_impl
= <_abc_data object>¶
-
_node_class
¶ alias of
aiida.orm.nodes.process.workflow.workflow.WorkflowNode
-
-
class
aiida.backends.tests.engine.test_process.
ProcessStackTest
(inputs=None, logger=None, runner=None, parent_pid=None, enable_persistence=True)[source]¶ Bases:
aiida.engine.processes.process.Process
-
__abstractmethods__
= frozenset({})¶
-
__module__
= 'aiida.backends.tests.engine.test_process'¶
-
_abc_impl
= <_abc_data object>¶
-
_node_class
¶ alias of
aiida.orm.nodes.process.workflow.workflow.WorkflowNode
-
-
class
aiida.backends.tests.engine.test_process.
TestProcess
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.engine.test_process'¶
-
test_input_after_stored
()[source]¶ Verify that adding an input link after storing a ProcessNode will raise because it is illegal.
-
test_output_dictionary
()[source]¶ Verify that a dictionary can be passed as an output for a namespace.
-
test_output_validation_error
()[source]¶ Test that a process is marked as failed if its output namespace validation fails.
-
test_process_type_with_entry_point
()[source]¶ For a process with a registered entry point, the process_type will be its formatted entry point string
-
test_process_type_without_entry_point
()[source]¶ For a process without a registered entry point, the process_type will fall back on the fully qualified class name
-
-
class
aiida.backends.tests.engine.test_process.
TestProcessNamespace
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.engine.test_process'¶
-
-
class
aiida.backends.tests.engine.test_process_builder.
MappingData
(data=None)[source]¶ Bases:
collections.abc.Mapping
,aiida.orm.nodes.data.data.Data
Data sub class that is also a Mapping.
-
__abstractmethods__
= frozenset({})¶
-
__dict__
= mappingproxy({'__module__': 'aiida.backends.tests.engine.test_process_builder', '__doc__': 'Data sub class that is also a `Mapping`.', '__init__': <function MappingData.__init__>, '__getitem__': <function MappingData.__getitem__>, '__iter__': <function MappingData.__iter__>, '__len__': <function MappingData.__len__>, '__dict__': <attribute '__dict__' of 'MappingData' objects>, '__weakref__': <attribute '__weakref__' of 'MappingData' objects>, '__abstractmethods__': frozenset(), '_abc_impl': <_abc_data object>, '_logger': <Logger aiida.backends.tests.engine.test_process_builder.MappingData (REPORT)>, '_plugin_type_string': 'aiida.backends.tests.engine.test_process_builder.MappingData.', '_query_type_string': 'aiida.backends.tests.engine.test_process_builder.'})¶
-
__module__
= 'aiida.backends.tests.engine.test_process_builder'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
_abc_impl
= <_abc_data object>¶
-
_logger
= <Logger aiida.backends.tests.engine.test_process_builder.MappingData (REPORT)>¶
-
_plugin_type_string
= 'aiida.backends.tests.engine.test_process_builder.MappingData.'¶
-
_query_type_string
= 'aiida.backends.tests.engine.test_process_builder.'¶
-
-
class
aiida.backends.tests.engine.test_process_builder.
TestLazyProcessNamespace
(inputs=None, logger=None, runner=None, parent_pid=None, enable_persistence=True)[source]¶ Bases:
aiida.engine.processes.process.Process
Process with basic nested namespaces to test “pruning” of empty nested namespaces from the builder.
-
__abstractmethods__
= frozenset({})¶
-
__module__
= 'aiida.backends.tests.engine.test_process_builder'¶
-
_abc_impl
= <_abc_data object>¶
-
-
class
aiida.backends.tests.engine.test_process_builder.
TestProcessBuilder
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.engine.test_process_builder'¶
-
test_builder_inputs
()[source]¶ Test the ProcessBuilder._inputs method to get the inputs with and without prune set to True.
-
test_builder_restart_work_chain
()[source]¶ Verify that nested namespaces imploded into flat link labels can be reconstructed into nested namespaces.
-
test_code_get_builder
()[source]¶ Test that the Code.get_builder method returns a builder where the code is already set.
-
test_dynamic_setters
()[source]¶ Verify that the attributes of the TestWorkChain can be set but defaults are not there.
-
test_port_names_overlapping_mutable_mapping_methods
()[source]¶ Check that port names take precedence over collections.MutableMapping methods.
The ProcessBuilderNamespace is a collections.MutableMapping but since the port names are made accessible as attributes, they can overlap with some of the mappings builtin methods, e.g. values(), items() etc. The port names should take precendence in this case and if one wants to access the mapping methods one needs to cast the builder to a dictionary first.
-
-
class
aiida.backends.tests.engine.test_process_builder.
TestWorkChain
(inputs=None, logger=None, runner=None, enable_persistence=True)[source]¶ Bases:
aiida.engine.processes.workchains.workchain.WorkChain
-
__abstractmethods__
= frozenset({})¶
-
__module__
= 'aiida.backends.tests.engine.test_process_builder'¶
-
_abc_impl
= <_abc_data object>¶
-
Tests for the process_function decorator.
-
class
aiida.backends.tests.engine.test_process_function.
TestProcessFunction
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Note that here we use @workfunctions and @calculations, the concrete versions of the @process_function decorator, even though we are testing only the shared functionality that is captured in the @process_function decorator, relating to the transformation of the wrapped function into a FunctionProcess. The reason we do not use the @process_function decorator itself, is because it does not have a node class by default. We could create one on the fly, but then anytime inputs or outputs would be attached to it in the tests, the validate_link function would complain as the dummy node class is not recognized as a valid process node.
-
__module__
= 'aiida.backends.tests.engine.test_process_function'¶
-
test_function_args_and_kwargs
()[source]¶ Simple process function that defines a positional argument and keyword arguments.
-
test_function_args_and_kwargs_default
()[source]¶ Simple process function that defines a positional argument and an argument with a default.
-
test_function_args_passing_kwargs
()[source]¶ Cannot pass kwargs if the function does not explicitly define it accepts kwargs.
-
test_function_args_with_default
()[source]¶ Simple process function that defines a single argument with a default.
-
test_function_defaults
()[source]¶ Verify that a process function can define a default label and description but can be overriden.
-
test_function_out_unstored
()[source]¶ A workfunction that returns an unstored node should raise as it indicates users tried to create data.
-
test_function_set_label_description
()[source]¶ Verify that the label and description can be set for all process function variants.
-
test_function_with_none_default
()[source]¶ Simple process function that defines a keyword with None as default value.
-
test_hashes
()[source]¶ Test that the hashes generated for identical process functions with identical inputs are the same.
-
test_hashes_different
()[source]¶ Test that the hashes generated for identical process functions with different inputs are the different.
-
test_normal_exception
()[source]¶ If a process, for example a FunctionProcess, excepts, the exception should be stored in the node.
-
test_process_type
()[source]¶ Test that the process type correctly contains the module and name of original decorated function.
-
Tests for the ProcessSpec class.
-
class
aiida.backends.tests.engine.test_process_spec.
TestProcessSpec
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests for the ProcessSpec class.
-
__module__
= 'aiida.backends.tests.engine.test_process_spec'¶
-
-
class
aiida.backends.tests.engine.test_rmq.
TestProcessControl
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Test AiiDA’s RabbitMQ functionalities.
-
TIMEOUT
= 2.0¶
-
__module__
= 'aiida.backends.tests.engine.test_rmq'¶
-
Tests for the run functions.
-
class
aiida.backends.tests.engine.test_run.
TestRun
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests for the run functions.
-
__module__
= 'aiida.backends.tests.engine.test_run'¶
-
-
class
aiida.backends.tests.engine.test_runners.
Proc
(inputs=None, logger=None, runner=None, parent_pid=None, enable_persistence=True)[source]¶ Bases:
aiida.engine.processes.process.Process
-
__abstractmethods__
= frozenset({})¶
-
__module__
= 'aiida.backends.tests.engine.test_runners'¶
-
_abc_impl
= <_abc_data object>¶
-
_node_class
¶ alias of
aiida.orm.nodes.process.workflow.workflow.WorkflowNode
-
-
class
aiida.backends.tests.engine.test_runners.
TestWorkchain
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.engine.test_runners'¶
-
-
class
aiida.backends.tests.engine.test_transport.
TestTransportQueue
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests for the transport queue
-
__module__
= 'aiida.backends.tests.engine.test_transport'¶
-
tearDown
(*args, **kwargs)[source]¶ Hook method for deconstructing the test fixture after testing it.
-
-
class
aiida.backends.tests.engine.test_utils.
TestExponentialBackoffRetry
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests for the exponential backoff retry coroutine.
-
__module__
= 'aiida.backends.tests.engine.test_utils'¶
-
test_exponential_backoff_max_attempts_exceeded
()[source]¶ Test that exponential backoff will finally raise if max_attempts is exceeded
-
-
class
aiida.backends.tests.engine.test_work_chain.
ChildExposeWorkChain
(inputs=None, logger=None, runner=None, enable_persistence=True)[source]¶ Bases:
aiida.engine.processes.workchains.workchain.WorkChain
-
__abstractmethods__
= frozenset({})¶
-
__module__
= 'aiida.backends.tests.engine.test_work_chain'¶
-
_abc_impl
= <_abc_data object>¶
-
-
class
aiida.backends.tests.engine.test_work_chain.
GrandParentExposeWorkChain
(inputs=None, logger=None, runner=None, enable_persistence=True)[source]¶ Bases:
aiida.engine.processes.workchains.workchain.WorkChain
-
__abstractmethods__
= frozenset({})¶
-
__module__
= 'aiida.backends.tests.engine.test_work_chain'¶
-
_abc_impl
= <_abc_data object>¶
-
-
class
aiida.backends.tests.engine.test_work_chain.
IfTest
(inputs=None, logger=None, runner=None, enable_persistence=True)[source]¶ Bases:
aiida.engine.processes.workchains.workchain.WorkChain
-
__abstractmethods__
= frozenset({})¶
-
__module__
= 'aiida.backends.tests.engine.test_work_chain'¶
-
_abc_impl
= <_abc_data object>¶
-
-
class
aiida.backends.tests.engine.test_work_chain.
ParentExposeWorkChain
(inputs=None, logger=None, runner=None, enable_persistence=True)[source]¶ Bases:
aiida.engine.processes.workchains.workchain.WorkChain
-
_Process__called
= True¶
-
__abstractmethods__
= frozenset({})¶
-
__module__
= 'aiida.backends.tests.engine.test_work_chain'¶
-
_abc_impl
= <_abc_data object>¶
-
_spec
= <aiida.engine.processes.workchains.workchain.WorkChainSpec object>¶
-
-
class
aiida.backends.tests.engine.test_work_chain.
PotentialFailureWorkChain
(inputs=None, logger=None, runner=None, enable_persistence=True)[source]¶ Bases:
aiida.engine.processes.workchains.workchain.WorkChain
-
EXIT_MESSAGE
= 'Well you did ask for it'¶
-
EXIT_STATUS
= 1¶
-
OUTPUT_LABEL
= 'optional_output'¶
-
OUTPUT_VALUE
= 144¶
-
__abstractmethods__
= frozenset({})¶
-
__module__
= 'aiida.backends.tests.engine.test_work_chain'¶
-
_abc_impl
= <_abc_data object>¶
-
-
class
aiida.backends.tests.engine.test_work_chain.
SerializeWorkChain
(inputs=None, logger=None, runner=None, enable_persistence=True)[source]¶ Bases:
aiida.engine.processes.workchains.workchain.WorkChain
-
__abstractmethods__
= frozenset({})¶
-
__module__
= 'aiida.backends.tests.engine.test_work_chain'¶
-
_abc_impl
= <_abc_data object>¶
-
-
class
aiida.backends.tests.engine.test_work_chain.
TestContext
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.engine.test_work_chain'¶
-
-
class
aiida.backends.tests.engine.test_work_chain.
TestDefaultUniqueness
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Test that default inputs of exposed nodes will get unique UUIDS.
-
class
Child
(inputs=None, logger=None, runner=None, enable_persistence=True)[source]¶ Bases:
aiida.engine.processes.workchains.workchain.WorkChain
-
__abstractmethods__
= frozenset({})¶
-
__module__
= 'aiida.backends.tests.engine.test_work_chain'¶
-
_abc_impl
= <_abc_data object>¶
-
-
class
Parent
(inputs=None, logger=None, runner=None, enable_persistence=True)[source]¶ Bases:
aiida.engine.processes.workchains.workchain.WorkChain
-
__abstractmethods__
= frozenset({})¶
-
__module__
= 'aiida.backends.tests.engine.test_work_chain'¶
-
_abc_impl
= <_abc_data object>¶
-
-
__module__
= 'aiida.backends.tests.engine.test_work_chain'¶
-
test_unique_default_inputs
()[source]¶ The default value for the Child will be constructed at import time, which will be an unstored Bool node with a given ID. When expose_inputs is called on the ProcessSpec of the Parent workchain, for the Child workchain, the ports of the Child will be deepcopied into the portnamespace of the Parent, in this case twice, into different namespaces. The port in each namespace will have a deepcopied version of the unstored Bool node. When the Parent workchain is now called without inputs, both those nodes will be stored and used as inputs, but they will have the same UUID, unless the deepcopy will have guaranteed that a new UUID is generated for unstored nodes.
-
class
-
class
aiida.backends.tests.engine.test_work_chain.
TestExitStatus
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
This class should test the various ways that one can exit from the outline flow of a WorkChain, other than it running it all the way through. Currently this can be done directly in the outline by calling the return_ construct, or from an outline step function by returning a non-zero integer or an ExitCode with a non-zero status
-
__module__
= 'aiida.backends.tests.engine.test_work_chain'¶
-
-
class
aiida.backends.tests.engine.test_work_chain.
TestImmutableInputWorkchain
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Test that inputs cannot be modified
-
__module__
= 'aiida.backends.tests.engine.test_work_chain'¶
-
-
class
aiida.backends.tests.engine.test_work_chain.
TestSerializeWorkChain
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Test workchains with serialized input / output.
-
__module__
= 'aiida.backends.tests.engine.test_work_chain'¶
-
-
class
aiida.backends.tests.engine.test_work_chain.
TestWorkChainAbort
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Test the functionality to abort a workchain
-
class
AbortableWorkChain
(inputs=None, logger=None, runner=None, enable_persistence=True)[source]¶ Bases:
aiida.engine.processes.workchains.workchain.WorkChain
-
__abstractmethods__
= frozenset({})¶
-
__module__
= 'aiida.backends.tests.engine.test_work_chain'¶
-
_abc_impl
= <_abc_data object>¶
-
-
__module__
= 'aiida.backends.tests.engine.test_work_chain'¶
-
class
-
class
aiida.backends.tests.engine.test_work_chain.
TestWorkChainAbortChildren
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Test the functionality to abort a workchain and verify that children are also aborted appropriately
-
class
MainWorkChain
(inputs=None, logger=None, runner=None, enable_persistence=True)[source]¶ Bases:
aiida.engine.processes.workchains.workchain.WorkChain
-
__abstractmethods__
= frozenset({})¶
-
__module__
= 'aiida.backends.tests.engine.test_work_chain'¶
-
_abc_impl
= <_abc_data object>¶
-
-
class
SubWorkChain
(inputs=None, logger=None, runner=None, enable_persistence=True)[source]¶ Bases:
aiida.engine.processes.workchains.workchain.WorkChain
-
__abstractmethods__
= frozenset({})¶
-
__module__
= 'aiida.backends.tests.engine.test_work_chain'¶
-
_abc_impl
= <_abc_data object>¶
-
-
__module__
= 'aiida.backends.tests.engine.test_work_chain'¶
-
class
-
class
aiida.backends.tests.engine.test_work_chain.
TestWorkChainExpose
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Test the expose inputs / outputs functionality
-
__module__
= 'aiida.backends.tests.engine.test_work_chain'¶
-
-
class
aiida.backends.tests.engine.test_work_chain.
TestWorkChainMisc
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
class
IllegalSubmitWorkChain
(inputs=None, logger=None, runner=None, enable_persistence=True)[source]¶ Bases:
aiida.engine.processes.workchains.workchain.WorkChain
-
__abstractmethods__
= frozenset({})¶
-
__module__
= 'aiida.backends.tests.engine.test_work_chain'¶
-
_abc_impl
= <_abc_data object>¶
-
-
class
PointlessWorkChain
(inputs=None, logger=None, runner=None, enable_persistence=True)[source]¶ Bases:
aiida.engine.processes.workchains.workchain.WorkChain
-
__abstractmethods__
= frozenset({})¶
-
__module__
= 'aiida.backends.tests.engine.test_work_chain'¶
-
_abc_impl
= <_abc_data object>¶
-
-
__module__
= 'aiida.backends.tests.engine.test_work_chain'¶
-
class
-
class
aiida.backends.tests.engine.test_work_chain.
TestWorkchain
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.engine.test_work_chain'¶
-
test_call_link_label
()[source]¶ Test that the call_link_label metadata input is properly used and set.
-
test_define_not_calling_super
()[source]¶ A WorkChain that does not call super in define classmethod should raise.
-
test_out_unstored
()[source]¶ Calling self.out on an unstored Node should raise.
It indicates that users created new data whose provenance will be lost.
-
test_process_status_sub_processes
()[source]¶ Test that process status is set on node when waiting for sub processes.
-
test_report_dbloghandler
()[source]¶ Test whether the WorkChain, through its Process, has a logger set for which the DbLogHandler has been attached. Because if this is not the case, the ‘report’ method will not actually hit the DbLogHandler and the message will not be stored in the database
-
-
class
aiida.backends.tests.engine.test_work_chain.
Wf
(inputs=None, logger=None, runner=None, enable_persistence=True)[source]¶ Bases:
aiida.engine.processes.workchains.workchain.WorkChain
-
__abstractmethods__
= frozenset({})¶
-
__module__
= 'aiida.backends.tests.engine.test_work_chain'¶
-
_abc_impl
= <_abc_data object>¶
-
finished_steps
= {}¶
-
-
aiida.backends.tests.engine.test_work_chain.
run_and_check_success
(process_class, **kwargs)[source]¶ Instantiates the process class and executes it followed by a check that it is finished successfully
- Returns
instance of process
-
aiida.backends.tests.engine.test_work_chain.
run_until_paused
(proc)[source]¶ Set up a future that will be resolved on entering the WAITING state
-
aiida.backends.tests.engine.test_work_chain.
run_until_waiting
(proc)[source]¶ Set up a future that will be resolved on entering the WAITING state
Tests for the workfunction decorator and WorkFunctionNode.
-
class
aiida.backends.tests.engine.test_workfunctions.
TestWorkFunction
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests for workfunctions.
-
__module__
= 'aiida.backends.tests.engine.test_workfunctions'¶
-
test_call_link_label
()[source]¶ Verify that setting a call_link_label on a calcfunction called from a workfunction works.
-
test_workfunction_default_linkname
()[source]¶ Verify that a workfunction that returns a single Data node gets a default link label.
-
test_workfunction_links
()[source]¶ Verify that a workfunction can only get RETURN links and no CREATE links.
-