aiida.backends.tests.work package¶
Subpackages¶
Submodules¶
-
class
aiida.backends.tests.work.class_loader.
TestJobProcess
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.work.class_loader'¶
-
-
class
aiida.backends.tests.work.common.
BadOutput
[source]¶ Bases:
aiida.work.process.Process
A Process that emits an output that isn’t part of the spec raising an exception.
-
__abstractmethods__
= frozenset([])¶
-
__module__
= 'aiida.backends.tests.work.common'¶
-
_abc_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache_version
= 94¶
-
_abc_registry
= <_weakrefset.WeakSet object>¶
-
-
class
aiida.backends.tests.work.common.
DummyProcess
[source]¶ Bases:
aiida.work.process.Process
A Process that does nothing when it runs.
-
__abstractmethods__
= frozenset([])¶
-
__module__
= 'aiida.backends.tests.work.common'¶
-
_abc_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache_version
= 94¶
-
_abc_registry
= <_weakrefset.WeakSet object>¶
-
-
class
aiida.backends.tests.work.daemon.
FailCreateFromSavedStateProcess
[source]¶ Bases:
aiida.work.test_utils.DummyProcess
This class emulates a failure that occurs when loading the process from a saved state.
-
__abstractmethods__
= frozenset([])¶
-
__module__
= 'aiida.backends.tests.work.daemon'¶
-
_abc_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache_version
= 94¶
-
_abc_registry
= <_weakrefset.WeakSet object>¶
-
on_create
(pid, inputs, saved_instance_state)[source]¶ Called when the process is created. If a checkpoint is supplied the process should reinstate its state at the time the checkpoint was taken and if the checkpoint has a wait_on the process will continue from the corresponding callback function.
Parameters: inputs – The inputs the process should run using.
-
-
class
aiida.backends.tests.work.daemon.
ProcessEventsTester
[source]¶ Bases:
aiida.work.process.Process
-
EVENTS
= ['create', 'run', 'continue_', 'finish', 'emitted', 'stop', 'destroy']¶
-
__abstractmethods__
= frozenset([])¶
-
__module__
= 'aiida.backends.tests.work.daemon'¶
-
_abc_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache_version
= 94¶
-
_abc_registry
= <_weakrefset.WeakSet object>¶
-
_on_output_emitted
(output_port, value, dynamic)[source]¶ The process has emitted a value on the given output port.
Parameters: - output_port – The output port name the value was emitted on
- value – The value emitted
- dynamic – Was the output port a dynamic one (i.e. not known beforehand?)
-
on_create
(pid, inputs, saved_instance_state)[source]¶ Called when the process is created. If a checkpoint is supplied the process should reinstate its state at the time the checkpoint was taken and if the checkpoint has a wait_on the process will continue from the corresponding callback function.
Parameters: inputs – The inputs the process should run using.
-
on_destroy
()[source]¶ Called when a Process enters the DESTROYED state which should be the final process state and so we seal the calculation node
-
on_finish
()[source]¶ Called when a Process enters the FINISHED state at which point we set the corresponding attribute of the workcalculation node
-
on_run
()[source]¶ Called when the process is about to run some code either for the first time (in which case an on_start message would have been received) or after something it was waiting on has finished (in which case an on_continue message would have been received).
Any class overriding this method should make sure to call the super method, usually at the end of the function.
-
-
class
aiida.backends.tests.work.daemon.
TestDaemon
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.work.daemon'¶
-
-
class
aiida.backends.tests.work.persistence.
TestProcess
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.work.persistence'¶
-
-
class
aiida.backends.tests.work.process.
ProcessStackTest
[source]¶ Bases:
aiida.work.process.Process
-
__abstractmethods__
= frozenset([])¶
-
__module__
= 'aiida.backends.tests.work.process'¶
-
_abc_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache_version
= 94¶
-
_abc_registry
= <_weakrefset.WeakSet object>¶
-
on_create
(pid, inputs, saved_instance_state)[source]¶ Called when the process is created. If a checkpoint is supplied the process should reinstate its state at the time the checkpoint was taken and if the checkpoint has a wait_on the process will continue from the corresponding callback function.
Parameters: inputs – The inputs the process should run using.
-
-
class
aiida.backends.tests.work.process.
TestFunctionProcess
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.work.process'¶
-
-
class
aiida.backends.tests.work.process.
TestProcess
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.work.process'¶
-
-
class
aiida.backends.tests.work.processSpec.
TestProcessSpec
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.work.processSpec'¶
-
-
class
aiida.backends.tests.work.process_registry.
TestProcessRegistry
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.work.process_registry'¶
-
-
class
aiida.backends.tests.work.run.
TestRun
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.work.run'¶
-
-
class
aiida.backends.tests.work.tickingEngine.
DummyProcess
[source]¶ Bases:
aiida.work.process.Process
-
__abstractmethods__
= frozenset([])¶
-
__module__
= 'aiida.backends.tests.work.tickingEngine'¶
-
_abc_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache_version
= 94¶
-
_abc_registry
= <_weakrefset.WeakSet object>¶
-
-
class
aiida.backends.tests.work.tickingEngine.
TestTickingEngine
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.work.tickingEngine'¶
-
-
class
aiida.backends.tests.work.util.
StackTester
[source]¶ Bases:
aiida.work.process.Process
-
__abstractmethods__
= frozenset([])¶
-
__module__
= 'aiida.backends.tests.work.util'¶
-
_abc_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache_version
= 94¶
-
_abc_registry
= <_weakrefset.WeakSet object>¶
-
-
class
aiida.backends.tests.work.util.
TestProcessRegistry
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
These these check that the registry is giving out the right pid which when using storage is equal to the node pk.
-
__module__
= 'aiida.backends.tests.work.util'¶
-
-
class
aiida.backends.tests.work.workChain.
IfTest
[source]¶ Bases:
aiida.work.workchain.WorkChain
-
__abstractmethods__
= frozenset([])¶
-
__module__
= 'aiida.backends.tests.work.workChain'¶
-
_abc_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache_version
= 94¶
-
_abc_registry
= <_weakrefset.WeakSet object>¶
-
on_create
(pid, inputs, saved_state)[source]¶ Called when the process is created. If a checkpoint is supplied the process should reinstate its state at the time the checkpoint was taken and if the checkpoint has a wait_on the process will continue from the corresponding callback function.
Parameters: inputs – The inputs the process should run using.
-
-
class
aiida.backends.tests.work.workChain.
TestContext
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.work.workChain'¶
-
-
class
aiida.backends.tests.work.workChain.
TestHelpers
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Test the helper functions/classes used by workchains
-
__module__
= 'aiida.backends.tests.work.workChain'¶
-
-
class
aiida.backends.tests.work.workChain.
TestWorkChainAbort
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Test the functionality to abort a workchain
-
class
AbortableWorkChain
[source]¶ Bases:
aiida.work.workchain.WorkChain
-
__abstractmethods__
= frozenset([])¶
-
__module__
= 'aiida.backends.tests.work.workChain'¶
-
_abc_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache_version
= 94¶
-
_abc_registry
= <_weakrefset.WeakSet object>¶
-
-
__module__
= 'aiida.backends.tests.work.workChain'¶
-
test_simple_kill_through_node
()[source]¶ Run the workchain for one step and then kill it by calling kill on the underlying WorkCalculation node. This should have the workchain end up in the ABORTED state.
-
class
-
class
aiida.backends.tests.work.workChain.
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
[source]¶ Bases:
aiida.work.workchain.WorkChain
-
__abstractmethods__
= frozenset([])¶
-
__module__
= 'aiida.backends.tests.work.workChain'¶
-
_abc_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache_version
= 94¶
-
_abc_registry
= <_weakrefset.WeakSet object>¶
-
-
class
SubWorkChain
[source]¶ Bases:
aiida.work.workchain.WorkChain
-
__abstractmethods__
= frozenset([])¶
-
__module__
= 'aiida.backends.tests.work.workChain'¶
-
_abc_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache_version
= 94¶
-
_abc_registry
= <_weakrefset.WeakSet object>¶
-
-
__module__
= 'aiida.backends.tests.work.workChain'¶
-
class
-
class
aiida.backends.tests.work.workChain.
TestWorkchain
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.work.workChain'¶
-
-
class
aiida.backends.tests.work.workChain.
TestWorkchainWithOldWorkflows
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.work.workChain'¶
-
-
class
aiida.backends.tests.work.workChain.
Wf
[source]¶ Bases:
aiida.work.workchain.WorkChain
-
__abstractmethods__
= frozenset([])¶
-
__module__
= 'aiida.backends.tests.work.workChain'¶
-
_abc_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache_version
= 94¶
-
_abc_registry
= <_weakrefset.WeakSet object>¶
-
finished_steps
= {}¶
-
-
class
aiida.backends.tests.work.workfunction.
TestWf
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.work.workfunction'¶
-