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.

test_get_scheduler_stdout()[source]

Verify that the repository sandbox folder is cleaned after the node instance is garbage collected.

test_get_set_state()[source]

Test the get_state and set_state method.

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'
setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_computer_user_immutability()[source]

Test that computer and user of a node are immutable after storing.

test_repository_garbage_collection()[source]

Verify that the repository sandbox folder is cleaned after the node instance is garbage collected.

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'
setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_attributes()[source]

Test the Node.attributes property.

test_attributes_items()[source]

Test the Node.attributes_items generator.

test_attributes_keys()[source]

Test the Node.attributes_keys generator.

test_clear_attributes()[source]

Test the Node.clear_attributes method.

test_clear_extras()[source]

Test the Node.clear_extras method.

test_delete_attribute()[source]

Test the Node.delete_attribute method.

test_delete_attribute_many()[source]

Test the Node.delete_attribute_many method.

test_delete_extra()[source]

Test the Node.delete_extra method.

test_delete_extra_many()[source]

Test the Node.delete_extra_many method.

test_extras()[source]

Test the Node.extras property.

test_extras_items()[source]

Test the Node.extras_items generator.

test_extras_keys()[source]

Test the Node.extras_keys generator.

test_get_attribute()[source]

Test the Node.get_attribute method.

test_get_attribute_many()[source]

Test the Node.get_attribute_many method.

test_get_extra()[source]

Test the Node.get_extra method.

test_get_extra_many()[source]

Test the Node.get_extra_many method.

test_reset_attribute()[source]

Test the Node.reset_attribute method.

test_reset_extra()[source]

Test the Node.reset_extra method.

test_set_attribute()[source]

Test the Node.set_attribute method.

test_set_attribute_many()[source]

Test the Node.set_attribute method.

test_set_extra()[source]

Test the Node.set_extra method.

test_set_extra_many()[source]

Test the Node.set_extra method.

Bases: aiida.backends.testbase.AiidaTestCase

Test for linking from and to Node.

__module__ = 'aiida.backends.tests.orm.node.test_node'
setUp()[source]

Hook method for setting up the test fixture before exercising it.

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_incoming()[source]

Test that Node.get_incoming will return stored and cached input links.

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)

Validate the get_stored_link_triples method.

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_tab_completable_properties()[source]

Test properties to go from one node to a neighboring one

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.