aiida.backends.tests.orm.node package¶
Submodules¶
Tests for the CalcJobNode node sub class.
-
class
aiida.backends.tests.orm.node.test_calcjob.
TestCalcJobNode
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests for the CalcJobNode node sub class.
-
__module__
= 'aiida.backends.tests.orm.node.test_calcjob'¶
-
test_get_scheduler_stderr
()[source]¶ Verify that the repository sandbox folder is cleaned after the node instance is garbage collected.
-
Tests for the Node ORM class.
-
class
aiida.backends.tests.orm.node.test_node.
TestNode
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests for generic node functionality.
-
__module__
= 'aiida.backends.tests.orm.node.test_node'¶
-
-
class
aiida.backends.tests.orm.node.test_node.
TestNodeAttributesExtras
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Test for node attributes and extras.
-
__module__
= 'aiida.backends.tests.orm.node.test_node'¶
-
-
class
aiida.backends.tests.orm.node.test_node.
TestNodeLinks
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Test for linking from and to Node.
-
__module__
= 'aiida.backends.tests.orm.node.test_node'¶
-
test_add_incoming_call_calc
()[source]¶ Nodes can only have a single incoming CALL_CALC link, independent of the source node.
-
test_add_incoming_call_work
()[source]¶ Nodes can only have a single incoming CALL_WORK link, independent of the source node.
-
test_add_incoming_create
()[source]¶ Nodes can only have a single incoming CREATE link, independent of the source node.
-
test_add_incoming_input_calc
()[source]¶ Nodes can have an infinite amount of incoming INPUT_CALC links, as long as the link pair is unique.
-
test_add_incoming_input_work
()[source]¶ Nodes can have an infinite amount of incoming INPUT_WORK links, as long as the link pair is unique.
-
test_add_incoming_return
()[source]¶ Nodes can have an infinite amount of incoming RETURN links, as long as the link triple is unique.
-
test_get_node_by_label
()[source]¶ Test the get_node_by_label() method of the LinkManager
In particular, check both the it returns the correct values, but also that it raises the expected exceptions where appropriate (missing link with a given label, or more than one link)
-
test_node_indegree_unique_pair
()[source]¶ Test that the validation of links with indegree unique_pair works correctly
The example here is a DataNode that has two incoming links with the same label, but with different types. This is legal and should pass validation.
-
test_node_indegree_unique_triple
()[source]¶ Test that the validation of links with indegree unique_triple works correctly
The example here is a DataNode that has two incoming RETURN links with the same label, but from different source nodes. This is legal and should pass validation.
-
test_node_outdegree_unique_triple
()[source]¶ Test that the validation of links with outdegree unique_triple works correctly
The example here is a CalculationNode that has two outgoing CREATE links with the same label, but to different target nodes. This is legal and should pass validation.
-
test_validate_incoming
()[source]¶ Test the validate_incoming method
For a generic Node all incoming link types are valid as long as the source is also of type Node and the link type is a valid LinkType enum value.
-
test_validate_incoming_ipsum
()[source]¶ Test the validate_incoming method with respect to linking ourselves.
-
test_validate_outgoing_workflow
()[source]¶ Verify that attaching an unstored Data node with RETURN link from a WorkflowNode raises.
This would for example be the case if a user inside a workfunction or work chain creates a new node based on its inputs or the outputs returned by another process and tries to attach it as an output. This would the provenance of that data node to be lost and should be explicitly forbidden by raising.
-