aiida.backends.tests.cmdline.params.types package¶
Submodules¶
Tests for the CalculationParamType.
-
class
aiida.backends.tests.cmdline.params.types.test_calculation.
TestCalculationParamType
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests for the CalculationParamType.
-
__module__
= 'aiida.backends.tests.cmdline.params.types.test_calculation'¶
-
classmethod
setUpClass
(*args, **kwargs)[source]¶ Create some code to test the CalculationParamType parameter type for the command line infrastructure We create an initial code with a random name and then on purpose create two code with a name that matches exactly the ID and UUID, respectively, of the first one. This allows us to test the rules implemented to solve ambiguities that arise when determing the identifier type
-
test_ambiguous_label_pk
()[source]¶ Situation: LABEL of entity_02 is exactly equal to ID of entity_01
Verify that using an ambiguous identifier gives precedence to the ID interpretation Appending the special ambiguity breaker character will force the identifier to be treated as a LABEL
-
Tests for the CodeParamType.
-
class
aiida.backends.tests.cmdline.params.types.test_code.
TestCodeParamType
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests for the CodeParamType.
-
__module__
= 'aiida.backends.tests.cmdline.params.types.test_code'¶
-
classmethod
setUpClass
(*args, **kwargs)[source]¶ Create some code to test the CodeParamType parameter type for the command line infrastructure We create an initial code with a random name and then on purpose create two code with a name that matches exactly the ID and UUID, respectively, of the first one. This allows us to test the rules implemented to solve ambiguities that arise when determing the identifier type
-
test_ambiguous_label_pk
()[source]¶ Situation: LABEL of entity_02 is exactly equal to ID of entity_01
Verify that using an ambiguous identifier gives precedence to the ID interpretation Appending the special ambiguity breaker character will force the identifier to be treated as a LABEL
-
test_ambiguous_label_uuid
()[source]¶ Situation: LABEL of entity_03 is exactly equal to UUID of entity_01
Verify that using an ambiguous identifier gives precedence to the UUID interpretation Appending the special ambiguity breaker character will force the identifier to be treated as a LABEL
-
test_entry_point_validation
()[source]¶ Verify that when an entry_point is defined in the constructor, it is respected in the validation.
-
test_get_by_fullname
()[source]¶ Verify that using the LABEL@machinename will retrieve the correct entity
-
Tests for the ComputerParamType.
-
class
aiida.backends.tests.cmdline.params.types.test_computer.
TestComputerParamType
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests for the ComputerParamType.
-
__module__
= 'aiida.backends.tests.cmdline.params.types.test_computer'¶
-
classmethod
setUpClass
(*args, **kwargs)[source]¶ Create some computers to test the ComputerParamType parameter type for the command line infrastructure We create an initial computer with a random name and then on purpose create two computers with a name that matches exactly the ID and UUID, respectively, of the first one. This allows us to test the rules implemented to solve ambiguities that arise when determing the identifier type
-
test_ambiguous_label_pk
()[source]¶ Situation: LABEL of entity_02 is exactly equal to ID of entity_01
Verify that using an ambiguous identifier gives precedence to the ID interpretation Appending the special ambiguity breaker character will force the identifier to be treated as a LABEL
-
Tests for the DataParamType.
-
class
aiida.backends.tests.cmdline.params.types.test_data.
TestDataParamType
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests for the DataParamType.
-
__module__
= 'aiida.backends.tests.cmdline.params.types.test_data'¶
-
classmethod
setUpClass
(*args, **kwargs)[source]¶ Create some code to test the DataParamType parameter type for the command line infrastructure We create an initial code with a random name and then on purpose create two code with a name that matches exactly the ID and UUID, respectively, of the first one. This allows us to test the rules implemented to solve ambiguities that arise when determing the identifier type
-
test_ambiguous_label_pk
()[source]¶ Situation: LABEL of entity_02 is exactly equal to ID of entity_01
Verify that using an ambiguous identifier gives precedence to the ID interpretation Appending the special ambiguity breaker character will force the identifier to be treated as a LABEL
-
Tests for the GroupParamType.
-
class
aiida.backends.tests.cmdline.params.types.test_group.
TestGroupParamType
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests for the GroupParamType.
-
__module__
= 'aiida.backends.tests.cmdline.params.types.test_group'¶
-
classmethod
setUpClass
(*args, **kwargs)[source]¶ Create some groups to test the GroupParamType parameter type for the command line infrastructure We create an initial group with a random name and then on purpose create two groups with a name that matches exactly the ID and UUID, respectively, of the first one. This allows us to test the rules implemented to solve ambiguities that arise when determing the identifier type
-
test_ambiguous_label_pk
()[source]¶ Situation: LABEL of entity_02 is exactly equal to ID of entity_01
Verify that using an ambiguous identifier gives precedence to the ID interpretation Appending the special ambiguity breaker character will force the identifier to be treated as a LABEL
-
Tests for the IdentifierParamType.
-
class
aiida.backends.tests.cmdline.params.types.test_identifier.
TestIdentifierParamType
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests for the IdentifierParamType.
-
__module__
= 'aiida.backends.tests.cmdline.params.types.test_identifier'¶
-
test_identifier_sub_classes
()[source]¶ The sub_classes keyword argument should allow to narrow the scope of the query based on the orm class
-
Tests for the NodeParamType.
-
class
aiida.backends.tests.cmdline.params.types.test_node.
TestNodeParamType
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests for the NodeParamType.
-
__module__
= 'aiida.backends.tests.cmdline.params.types.test_node'¶
-
classmethod
setUpClass
(*args, **kwargs)[source]¶ Create some code to test the NodeParamType parameter type for the command line infrastructure We create an initial code with a random name and then on purpose create two code with a name that matches exactly the ID and UUID, respectively, of the first one. This allows us to test the rules implemented to solve ambiguities that arise when determing the identifier type
-
test_ambiguous_label_pk
()[source]¶ Situation: LABEL of entity_02 is exactly equal to ID of entity_01
Verify that using an ambiguous identifier gives precedence to the ID interpretation Appending the special ambiguity breaker character will force the identifier to be treated as a LABEL
-
Tests for the PluginParamType.
-
class
aiida.backends.tests.cmdline.params.types.test_plugin.
TestPluginParamType
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests for the PluginParamType.
-
__module__
= 'aiida.backends.tests.cmdline.params.types.test_plugin'¶
-
test_complete_amibguity
()[source]¶ Test the complete method which is used for auto completion when the supported groups share an entry point with the same name, which can lead to ambiguity. In this case the autocomplete should always return the possibilites in the FULL entry point string format. When the user tries to autocomplete
-
test_complete_single_group
()[source]¶ Test the complete method which is used for auto completion when there is only a single valid group, which means there should never be ambiguity and specifying a full entry point string is not necessary, however, when the user decides to user either a FULL or PARTIAL string anyway, the completion should match that syntax
-
test_convert_load
()[source]¶ Test that the convert method returns the loaded entry point if load=True at construction time of parameter
-
test_get_entry_point_from_ambiguous
()[source]¶ Test the functionality of the get_entry_point_from_string which will take an entry point string and try to map it onto a valid entry point that is part of the groups defined for the parameter.
-