aiida.backends.tests package¶
-
aiida.backends.tests.
get_db_test_list
()[source]¶ This function returns the db_test_list for the current backend, merged with the ‘common’ tests.
Note: This function should be called only after setting the backend, and then it returns only the tests for this backend, and the common ones.
Subpackages¶
Submodules¶
-
class
aiida.backends.tests.backup_script.
TestBackupScriptIntegration
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.backup_script'¶
-
_aiida_rel_path
= '.aiida'¶
-
_backup_rel_path
= 'backup'¶
-
_bs_instance
= <aiida.common.additions.backup_script.backup_setup.BackupSetup object>¶
-
_repo_rel_path
= 'repository'¶
-
-
class
aiida.backends.tests.backup_script.
TestBackupScriptUnit
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.backup_script'¶
-
_json_test_input_1
= '{"backup_length_threshold": 2, "periodicity": 2, "oldest_object_backedup": "2014-07-18 13:54:53.688484+00:00", "end_date_of_backup": null, "days_to_backup": null, "backup_dir": "/scratch/aiida_user/backupScriptDest"}'¶
-
_json_test_input_2
= '{"backup_length_threshold": 2, "periodicity": 2, "oldest_object_backedup": "2014-07-18 13:54:53.688484+00:00", "end_date_of_backup": null, "days_to_backup": null, "backup_dir": "/scratch/aiida_user/backupScriptDest"}'¶
-
_json_test_input_3
= '{"backup_length_threshold": 2, "periodicity": 2, "oldest_object_backedup": "2014-07-18 13:54:53.688484+00:00", "end_date_of_backup": null, "days_to_backup": 2, "backup_dir": "/scratch/aiida_user/backupScriptDest"}'¶
-
_json_test_input_4
= '{"backup_length_threshold": 2, "periodicity": 2, "oldest_object_backedup": "2014-07-18 13:54:53.688484+00:00", "end_date_of_backup": "2014-07-22 14:54:53.688484+00:00", "days_to_backup": null, "backup_dir": "/scratch/aiida_user/backupScriptDest"}'¶
-
_json_test_input_5
= '{"backup_length_threshold": 2, "periodicity": 2, "oldest_object_backedup": "2014-07-18 13:54:53.688484+00:00", "end_date_of_backup": "2014-07-22 14:54:53.688484+00:00", "days_to_backup": 2, "backup_dir": "/scratch/aiida_user/backup"}'¶
-
_json_test_input_6
= '{"backup_length_threshold": 2, "periodicity": 2, "oldest_object_backedup": "2014-07-18 13:54:53.688484", "end_date_of_backup": "2014-07-22 14:54:53.688484", "days_to_backup": null, "backup_dir": "/scratch/./aiida_user////backup//"}'¶
-
test_full_deserialization_serialization_1
()[source]¶ This method tests the correct deserialization / serialization of the variables that should be stored in a file.
-
test_full_deserialization_serialization_2
()[source]¶ This method tests the correct deserialization / serialization of the variables that should be stored in a file.
-
test_full_deserialization_serialization_3
()[source]¶ This method tests the correct deserialization / serialization of the variables that should be stored in a file.
-
test_full_deserialization_serialization_4
()[source]¶ This method tests the correct deserialization / serialization of the variables that should be stored in a file.
-
test_loading_backup_time_params_from_file_1
()[source]¶ This method tests that the _backup_setup_inst limits are correctly loaded from the JSON string and are correctly set.
In the parsed JSON string, no _backup_setup_inst end limits are set
-
test_loading_backup_time_params_from_file_2
()[source]¶ This method tests that the _backup_setup_inst limits are correctly loaded from the JSON string and are correctly set.
In the parsed JSON string, only the daysToBackup limit is set.
-
test_loading_backup_time_params_from_file_3
()[source]¶ This method tests that the _backup_setup_inst limits are correctly loaded from the JSON string and are correctly set.
In the parsed JSON string, only the endDateOfBackup limit is set.
-
test_loading_backup_time_params_from_file_4
()[source]¶ This method tests that the _backup_setup_inst limits are correctly loaded from the JSON string and are correctly set.
In the parsed JSON string, the endDateOfBackup & daysToBackuplimit are set which should lead to an exception.
-
-
class
aiida.backends.tests.backup_setup_script.
TestBackupSetupScriptIntegration
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.backup_setup_script'¶
-
-
class
aiida.backends.tests.backup_setup_script.
TestBackupSetupScriptUnit
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.backup_setup_script'¶
-
-
class
aiida.backends.tests.base_dataclasses.
TestFloat
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.base_dataclasses'¶
-
-
class
aiida.backends.tests.base_dataclasses.
TestFloatIntMix
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.base_dataclasses'¶
-
-
class
aiida.backends.tests.base_dataclasses.
TestList
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.base_dataclasses'¶
-
-
class
aiida.backends.tests.calculation_node.
TestCalcNode
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
These tests check the features of Calculation nodes that differ from the base Node type
-
__module__
= 'aiida.backends.tests.calculation_node'¶
-
boolval
= True¶
-
dictval
= {'emptydict': {}, 'num': 3, 'recursive': {'a': 1, 'c': 1.2, 'b': True, 'e': {'yy': [], 'x': None, 'xx': {}, 'z': 'z'}, 'd': [1, 2, None]}, 'something': 'else'}¶
-
floatval
= 4.56¶
-
intval
= 123¶
-
listval
= [1, 's', True, None]¶
-
stateval
= 'RUNNING'¶
-
stringval
= 'aaaa'¶
-
Tests for the NWChem input plugins.
-
class
aiida.backends.tests.computer.
TestComputer
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.computer'¶
-
-
class
aiida.backends.tests.daemon.
TestDaemonBasic
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.daemon'¶
-
Tests for specific subclasses of Data
-
class
aiida.backends.tests.dataclasses.
TestArrayData
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests the ArrayData objects.
-
__module__
= 'aiida.backends.tests.dataclasses'¶
-
-
class
aiida.backends.tests.dataclasses.
TestBandsData
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests the BandsData objects.
-
__module__
= 'aiida.backends.tests.dataclasses'¶
-
-
class
aiida.backends.tests.dataclasses.
TestCalcStatus
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Test the functionality of calculation states.
-
__module__
= 'aiida.backends.tests.dataclasses'¶
-
-
class
aiida.backends.tests.dataclasses.
TestCifData
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests for CifData class.
-
class
StrictVersion
(vstring=None)¶ Bases:
distutils.version.Version
Version numbering for anal retentives and software idealists. Implements the standard interface for version number classes as described above. A version number consists of two or three dot-separated numeric components, with an optional “pre-release” tag on the end. The pre-release tag consists of the letter ‘a’ or ‘b’ followed by a number. If the numeric components of two version numbers are equal, then one with a pre-release tag will always be deemed earlier (lesser) than one without.
The following are valid version numbers (shown in the order that would be obtained by sorting according to the supplied cmp function):
0.4 0.4.0 (these two are equivalent) 0.4.1 0.5a1 0.5b3 0.5 0.9.6 1.0 1.0.4a3 1.0.4b1 1.0.4The following are examples of invalid version numbers:
1 2.7.2.2 1.3.a4 1.3pl1 1.3c4The rationale for this version numbering system will be explained in the distutils documentation.
-
__cmp__
(other)¶
-
__module__
= 'distutils.version'¶
-
__str__
()¶
-
parse
(vstring)¶
-
version_re
= <_sre.SRE_Pattern object>¶
-
-
__module__
= 'aiida.backends.tests.dataclasses'¶
-
get_pymatgen_version
()¶ Returns: string with pymatgen version, None if can not import.
-
has_ase
()¶ Returns: True if the ase module can be imported, False otherwise.
-
has_pycifrw
()¶ Returns: True if the PyCifRW module can be imported, False otherwise.
-
has_pymatgen
()¶ Returns: True if the pymatgen module can be imported, False otherwise.
-
has_spglib
()¶ Returns: True if the spglib module can be imported, False otherwise.
-
test_ase_primitive_and_conventional_cells_ase
()[source]¶ Checking the number of atoms per primitive/conventional cell returned by ASE ase.io.read() method. Test input is adapted from http://www.crystallography.net/cod/9012064.cif@120115
-
test_ase_primitive_and_conventional_cells_pymatgen
()[source]¶ Checking the number of atoms per primitive/conventional cell returned by ASE ase.io.read() method. Test input is adapted from http://www.crystallography.net/cod/9012064.cif@120115
-
test_cif_with_long_line
()[source]¶ Tests CifData - check that long lines (longer than 2048 characters) are supported. Should not raise any error.
-
valid_sample_cif_str
= "\n data_test\n _cell_length_a 10\n _cell_length_b 10\n _cell_length_c 10\n _cell_angle_alpha 90\n _cell_angle_beta 90\n _cell_angle_gamma 90\n _chemical_formula_sum 'C O2'\n loop_\n _atom_site_label\n _atom_site_fract_x\n _atom_site_fract_y\n _atom_site_fract_z\n _atom_site_attached_hydrogens\n C 0 0 0 0\n O 0.5 0.5 0.5 .\n H 0.75 0.75 0.75 0\n "¶
-
valid_sample_cif_str_2
= "\n data_test\n _cell_length_a 10\n _cell_length_b 10\n _cell_length_c 10\n _cell_angle_alpha 90\n _cell_angle_beta 90\n _cell_angle_gamma 90\n _chemical_formula_sum 'C O'\n loop_\n _atom_site_label\n _atom_site_fract_x\n _atom_site_fract_y\n _atom_site_fract_z\n _atom_site_attached_hydrogens\n C 0 0 0 0\n O 0.5 0.5 0.5 .\n "¶
-
class
-
class
aiida.backends.tests.dataclasses.
TestKindTestGeneral
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests the creation of Kind objects and their methods.
-
__module__
= 'aiida.backends.tests.dataclasses'¶
-
-
class
aiida.backends.tests.dataclasses.
TestKindTestMasses
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests the management of masses during the creation of Kind objects.
-
__module__
= 'aiida.backends.tests.dataclasses'¶
-
-
class
aiida.backends.tests.dataclasses.
TestKindValidSymbols
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests the symbol validation of the aiida.orm.data.structure.Kind class.
-
__module__
= 'aiida.backends.tests.dataclasses'¶
-
-
class
aiida.backends.tests.dataclasses.
TestKpointsData
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests the TrajectoryData objects.
-
__module__
= 'aiida.backends.tests.dataclasses'¶
-
test_kpoints_to_cartesian
()[source]¶ Test how the list of kpoints is converted to cartesian coordinates
-
test_path_wrapper_legacy
()[source]¶ This is a clone of the test_path test but instead it goes through the new wrapper calling the deprecated legacy implementation. This tests that the wrapper maintains the same behavior of the old implementation
-
-
class
aiida.backends.tests.dataclasses.
TestPymatgenFromStructureData
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests the creation of pymatgen Structure and Molecule objects from StructureData.
-
class
StrictVersion
(vstring=None)¶ Bases:
distutils.version.Version
Version numbering for anal retentives and software idealists. Implements the standard interface for version number classes as described above. A version number consists of two or three dot-separated numeric components, with an optional “pre-release” tag on the end. The pre-release tag consists of the letter ‘a’ or ‘b’ followed by a number. If the numeric components of two version numbers are equal, then one with a pre-release tag will always be deemed earlier (lesser) than one without.
The following are valid version numbers (shown in the order that would be obtained by sorting according to the supplied cmp function):
0.4 0.4.0 (these two are equivalent) 0.4.1 0.5a1 0.5b3 0.5 0.9.6 1.0 1.0.4a3 1.0.4b1 1.0.4The following are examples of invalid version numbers:
1 2.7.2.2 1.3.a4 1.3pl1 1.3c4The rationale for this version numbering system will be explained in the distutils documentation.
-
__cmp__
(other)¶
-
__module__
= 'distutils.version'¶
-
__str__
()¶
-
parse
(vstring)¶
-
version_re
= <_sre.SRE_Pattern object>¶
-
-
__module__
= 'aiida.backends.tests.dataclasses'¶
-
get_pymatgen_version
()¶ Returns: string with pymatgen version, None if can not import.
-
has_ase
()¶ Returns: True if the ase module can be imported, False otherwise.
-
has_pymatgen
()¶ Returns: True if the pymatgen module can be imported, False otherwise.
-
test_3
()[source]¶ Tests the conversion of StructureData to pymatgen’s Molecule (ASE -> StructureData -> pymatgen)
-
test_partial_occ_and_spin
()[source]¶ Tests StructureData -> pymatgen, with partial occupancies and spins. This should raise a ValueError.
-
test_roundtrip_kindnames
()[source]¶ Tests roundtrip StructureData -> pymatgen -> StructureData (no spins, but with all kind of kind names)
-
class
-
class
aiida.backends.tests.dataclasses.
TestSeekpathExplicitPath
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.dataclasses'¶
-
-
class
aiida.backends.tests.dataclasses.
TestSeekpathPath
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.dataclasses'¶
-
-
class
aiida.backends.tests.dataclasses.
TestSinglefileData
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Test the SinglefileData class.
-
__module__
= 'aiida.backends.tests.dataclasses'¶
-
-
class
aiida.backends.tests.dataclasses.
TestSiteValidWeights
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests valid weight lists.
-
__module__
= 'aiida.backends.tests.dataclasses'¶
-
-
class
aiida.backends.tests.dataclasses.
TestSpglibTupleConversion
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.dataclasses'¶
-
test_aiida_roundtrip
()[source]¶ Convert an AiiDA structure to a tuple and go back to see if we get the same results
-
-
class
aiida.backends.tests.dataclasses.
TestStructureData
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests the creation of StructureData objects (cell and pbc).
-
__module__
= 'aiida.backends.tests.dataclasses'¶
-
has_ase
()¶ Returns: True if the ase module can be imported, False otherwise.
-
has_pycifrw
()¶ Returns: True if the PyCifRW module can be imported, False otherwise.
-
has_spglib
()¶ Returns: True if the spglib module can be imported, False otherwise.
-
test_kind_4
()[source]¶ Test the management of kind (adding an atom with different symbols or weights).
-
test_kind_5
()[source]¶ Test the management of kinds (automatic creation of new kind if name is not specified and properties are different).
-
test_kind_5_bis
()[source]¶ Test the management of kinds (automatic creation of new kind if name is not specified and properties are different). This test was failing in, e.g., commit f6a8f4b.
-
test_kind_6
()[source]¶ Test the returning of kinds from the string name (most of the code copied from
test_kind_5()
).
-
-
class
aiida.backends.tests.dataclasses.
TestStructureDataFromAse
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests the creation of Sites from/to a ASE object.
-
__module__
= 'aiida.backends.tests.dataclasses'¶
-
has_ase
()¶ Returns: True if the ase module can be imported, False otherwise.
-
test_conversion_of_types_2
()[source]¶ Tests roundtrip ASE -> StructureData -> ASE, with tags, and changing the atomic masses
-
test_conversion_of_types_4
()[source]¶ Tests ASE -> StructureData -> ASE, in particular conversion tags / kind names
-
-
class
aiida.backends.tests.dataclasses.
TestStructureDataFromPymatgen
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests the creation of StructureData from a pymatgen Structure and Molecule objects.
-
class
StrictVersion
(vstring=None)¶ Bases:
distutils.version.Version
Version numbering for anal retentives and software idealists. Implements the standard interface for version number classes as described above. A version number consists of two or three dot-separated numeric components, with an optional “pre-release” tag on the end. The pre-release tag consists of the letter ‘a’ or ‘b’ followed by a number. If the numeric components of two version numbers are equal, then one with a pre-release tag will always be deemed earlier (lesser) than one without.
The following are valid version numbers (shown in the order that would be obtained by sorting according to the supplied cmp function):
0.4 0.4.0 (these two are equivalent) 0.4.1 0.5a1 0.5b3 0.5 0.9.6 1.0 1.0.4a3 1.0.4b1 1.0.4The following are examples of invalid version numbers:
1 2.7.2.2 1.3.a4 1.3pl1 1.3c4The rationale for this version numbering system will be explained in the distutils documentation.
-
__cmp__
(other)¶
-
__module__
= 'distutils.version'¶
-
__str__
()¶
-
parse
(vstring)¶
-
version_re
= <_sre.SRE_Pattern object>¶
-
-
__module__
= 'aiida.backends.tests.dataclasses'¶
-
get_pymatgen_version
()¶ Returns: string with pymatgen version, None if can not import.
-
has_pymatgen
()¶ Returns: True if the pymatgen module can be imported, False otherwise.
-
test_1
()[source]¶ Tests roundtrip pymatgen -> StructureData -> pymatgen Test’s input is derived from COD entry 9011963, processed with cif_mark_disorder (from cod-tools) and abbreviated.
-
test_2
()[source]¶ Tests xyz -> pymatgen -> StructureData Input source: http://pymatgen.org/_static/Molecule.html
-
test_multiple_kinds_alloy
()[source]¶ Tests that a structure with multiple sites with the same alloy symbols but different weights, get their own unique kind name
-
class
-
class
aiida.backends.tests.dataclasses.
TestStructureDataInit
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests the creation of StructureData objects (cell and pbc).
-
__module__
= 'aiida.backends.tests.dataclasses'¶
-
-
class
aiida.backends.tests.dataclasses.
TestStructureDataLock
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests that the structure is locked after storage
-
__module__
= 'aiida.backends.tests.dataclasses'¶
-
-
class
aiida.backends.tests.dataclasses.
TestStructureDataReload
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests the creation of StructureData, converting it to a raw format and converting it back.
-
__module__
= 'aiida.backends.tests.dataclasses'¶
-
-
class
aiida.backends.tests.dataclasses.
TestTrajectoryData
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests the TrajectoryData objects.
-
__module__
= 'aiida.backends.tests.dataclasses'¶
-
test_conversion_from_structurelist
()[source]¶ Check the method to create a TrajectoryData from list of AiiDA structures.
-
-
aiida.backends.tests.dataclasses.
has_seekpath
()[source]¶ Check if there is the seekpath dependency
Returns: True if seekpath is installed, False otherwise
-
aiida.backends.tests.dataclasses.
simplify
(string)[source]¶ Takes a string, strips spaces in each line and returns it Useful to compare strings when different versions of a code give different spaces.
-
aiida.backends.tests.dataclasses.
to_list_of_lists
(lofl)[source]¶ Converts an iterable of iterables to a list of lists, needed for some tests (e.g. when one has a tuple of lists, a list of tuples, …)
Parameters: lofl – an iterable of iterables Returns: a list of lists
Tests for subclasses of DbImporter, DbSearchResults and DbEntry
-
class
aiida.backends.tests.dbimporters.
TestCodDbImporter
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Test the CodDbImporter class.
-
__module__
= 'aiida.backends.tests.dbimporters'¶
-
has_pycifrw
()¶ Returns: True if the PyCifRW module can be imported, False otherwise.
-
-
class
aiida.backends.tests.dbimporters.
TestMpodDbImporter
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Test the MpodDbImporter class.
-
__module__
= 'aiida.backends.tests.dbimporters'¶
-
-
class
aiida.backends.tests.dbimporters.
TestNnincDbImporter
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Test the UpfEntry class.
-
__module__
= 'aiida.backends.tests.dbimporters'¶
-
-
class
aiida.backends.tests.dbimporters.
TestPcodDbImporter
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Test the PcodDbImporter class.
-
__module__
= 'aiida.backends.tests.dbimporters'¶
-
-
class
aiida.backends.tests.dbimporters.
TestTcodDbImporter
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Test the TcodDbImporter class.
-
__module__
= 'aiida.backends.tests.dbimporters'¶
-
-
class
aiida.backends.tests.example_helpers.
TestExampleHelpers
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
CODE_LABEL
= 'test_code'¶
-
INPUT_PLUGIN_NAME
= 'test_input_plugin'¶
-
__module__
= 'aiida.backends.tests.example_helpers'¶
-
Tests for the export and import routines.
-
class
aiida.backends.tests.export_and_import.
TestComplex
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.export_and_import'¶
-
test_complex_graph_import_export
()[source]¶ This test checks that a small and bit complex graph can be correctly exported and imported.
It will create the graph, store it to the database, export it to a file and import it. In the end it will check if the initial nodes are present at the imported graph.
-
-
class
aiida.backends.tests.export_and_import.
TestComputer
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.export_and_import'¶
-
test_correct_import_of_computer_json_params
()[source]¶ This test checks that the metadata and transport params are exported and imported correctly in both backends.
-
test_different_computer_same_name_import
()[source]¶ This test checks that if there is a name collision, the imported computers are renamed accordingly.
-
test_import_of_django_sqla_export_file
()[source]¶ Check why sqla import manages to import the django export file correctly
-
test_same_computer_different_name_import
()[source]¶ This test checks that if the computer is re-imported with a different name to the same database, then the original computer will not be renamed. It also checks that the names were correctly imported (without any change since there is no computer name collision)
-
test_same_computer_import
()[source]¶ Test that you can import nodes in steps without any problems. In this test we will import a first calculation and then a second one. The import should work as expected and have in the end two job calculations.
Each calculation is related to the same computer. In the end we should have only one computer
-
-
class
aiida.backends.tests.export_and_import.
TestLinks
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.export_and_import'¶
-
test_input_and_create_links
()[source]¶ Simple test that will verify that INPUT and CREATE links are properly exported and correctly recreated upon import.
-
-
class
aiida.backends.tests.export_and_import.
TestSimple
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.export_and_import'¶
-
test_5
()[source]¶ This test checks that nodes belonging to different users are correctly exported & imported.
-
test_6
()[source]¶ This test checks that nodes belonging to user A (which is not the default user) can be correctly exported, imported, enriched with nodes from the default user, re-exported & re-imported and that in the end all the nodes that have been finally imported belonging to the right users.
-
test_7
()[source]¶ This test checks that nodes that belong to a specific group are correctly imported and exported.
-
-
class
aiida.backends.tests.export_and_import.
TestSpecificImport
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.export_and_import'¶
-
test_cycle_structure_data
()[source]¶ Create an export with some Calculation and Data nodes and import it after having cleaned the database. Verify that the nodes and their attributes are restored properly after importing the created export archive
-
test_simple_import
()[source]¶ This is a very simple test which checks that an export file with nodes that are not associated to a computer is imported correctly. In Django when such nodes are exported, there is an empty set for computers in the export file. In SQLA there is such a set only when a computer is associated with the exported nodes. When an empty computer set is found at the export file (when imported to an SQLA profile), the SQLA import code used to crash. This test demonstrates this problem.
-
Generic tests that need the use of the DB
-
class
aiida.backends.tests.generic.
TestBool
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.generic'¶
-
-
class
aiida.backends.tests.generic.
TestCode
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Test the Code class.
-
__module__
= 'aiida.backends.tests.generic'¶
-
-
class
aiida.backends.tests.generic.
TestDbExtras
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Test Extras
-
__module__
= 'aiida.backends.tests.generic'¶
-
-
class
aiida.backends.tests.generic.
TestGroups
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Test groups.
-
__module__
= 'aiida.backends.tests.generic'¶
-
-
class
aiida.backends.tests.generic.
TestWfBasic
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests for the workflows
-
__module__
= 'aiida.backends.tests.generic'¶
-
Tests for inline calculations.
-
class
aiida.backends.tests.inline_calculation.
TestInlineCalculation
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests for the InlineCalculation calculations.
-
__module__
= 'aiida.backends.tests.inline_calculation'¶
-
-
class
aiida.backends.tests.nodes.
AnyValue
[source]¶ Bases:
object
Helper class that compares equal to everything.
-
__dict__
= dict_proxy({'__dict__': <attribute '__dict__' of 'AnyValue' objects>, '__weakref__': <attribute '__weakref__' of 'AnyValue' objects>, '__module__': 'aiida.backends.tests.nodes', '__eq__': <function __eq__>, '__doc__': '\n Helper class that compares equal to everything.\n '})¶
-
__module__
= 'aiida.backends.tests.nodes'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
-
class
aiida.backends.tests.nodes.
TestDataNode
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
These tests check the features of Data nodes that differ from the base Node
-
__module__
= 'aiida.backends.tests.nodes'¶
-
boolval
= True¶
-
dictval
= {'emptydict': {}, 'num': 3, 'recursive': {'a': 1, 'c': 1.2, 'b': True, 'e': {'yy': [], 'x': None, 'xx': {}, 'z': 'z'}, 'd': [1, 2, None]}, 'something': 'else'}¶
-
emptydict
= {}¶
-
emptylist
= []¶
-
floatval
= 4.56¶
-
intval
= 123¶
-
listval
= [1, 's', True, None]¶
-
stringval
= 'aaaa'¶
-
-
class
aiida.backends.tests.nodes.
TestNodeBasic
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
These tests check the basic features of nodes (setting of attributes, copying of files, …)
-
DISABLED
()[source]¶ This test routine is disabled for the time being; I will re-enable when I have time to implement the check of the length of the ‘key’.
-
__module__
= 'aiida.backends.tests.nodes'¶
-
boolval
= True¶
-
dictval
= {'emptydict': {}, 'num': 3, 'recursive': {'a': 1, 'c': 1.2, 'b': True, 'e': {'yy': [], 'x': None, 'xx': {}, 'z': 'z'}, 'd': [1, 2, None]}, 'something': 'else'}¶
-
emptydict
= {}¶
-
emptylist
= []¶
-
floatval
= 4.56¶
-
intval
= 123¶
-
listval
= [1, 's', True, None]¶
-
stringval
= 'aaaa'¶
-
test_attr_and_extras_multikey
()[source]¶ Multiple nodes with the same key. This should not be a problem
I test only extras because the two tables are formally identical
-
test_attribute_mutability
()[source]¶ Attributes of a node should be immutable after storing, unless the stored_check is disabled in the call
-
test_code_description
()[source]¶ This test checks that the code description is retrieved correctly when the code is searched with its id and label.
-
test_code_loading_from_string
()[source]¶ Checks that the method Code.get_from_string works correctly.
-
test_delete_extras
()[source]¶ Checks the ability of deleting extras, also when they are dictionaries or lists.
-
test_get_subclass_from_pk
()[source]¶ This test checks that aiida.orm.implementation.general.node.AbstractNode#get_subclass_from_pk works correctly for both backends.
-
test_load_unknown_calculation_type
()[source]¶ Test that the loader will choose a common calculation ancestor for an unknown data type. For the case where, e.g., the user doesn’t have the necessary plugin.
-
test_load_unknown_data_type
()[source]¶ Test that the loader will choose a common data ancestor for an unknown data type. For the case where, e.g., the user doesn’t have the necessary plugin.
-
-
class
aiida.backends.tests.nodes.
TestNodeDeletion
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.nodes'¶
-
_check_existence
(uuids_check_existence, uuids_check_deleted)[source]¶ I get 2 lists of uuids
Parameters: - uuids_check_existence (list) – The list of uuids that have to exist
- uuids_check_deleted (list) – The list of uuids that should not exist, I check that NotExistent is raised.
-
_create_calls_n_returns_graph
()[source]¶ Creates a complicated graph with a master with 1 inputs, 2 slaves of it also using that input and an additional 1, producing output that is either returned or not returned by the master. Master also creates one nodes. This allows to check whether the delete_nodes command works as anticipated.
-
test_delete_called_but_not_caller
()[source]¶ Check that deleting a Calculation that was called by another Calculation which won’t be deleted works, even though it will raise a warning
-
test_deletion_no_calls_no_returns
()[source]¶ Checking the case where I don’t follow calls and also not return links for deletion
-
test_deletion_no_calls_with_returns
()[source]¶ Checking the case where I follow returns and not calls for deletion
-
test_deletion_simple
()[source]¶ I’m setting up a sequence of nodes connected by data provenance links. Testing whether I will delete the right ones.
-
test_deletion_with_calls_no_returns
()[source]¶ Checking the case where I follow calls and not return links for deletion
-
-
class
aiida.backends.tests.nodes.
TestNodeHashing
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests the functionality of hashing a node
-
__module__
= 'aiida.backends.tests.nodes'¶
-
-
class
aiida.backends.tests.nodes.
TestQueryWithAiidaObjects
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Test if queries work properly also with aiida.orm.Node classes instead of aiida.backends.djsite.db.models.DbNode objects.
-
__module__
= 'aiida.backends.tests.nodes'¶
-
-
class
aiida.backends.tests.nodes.
TestSubNodesAndLinks
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.nodes'¶
-
test_cachelink
()[source]¶ Test the proper functionality of the links cache, with different scenarios.
-
test_has_children_has_parents
()[source]¶ This check verifies that the properties has_children has_parents of the Node class behave correctly.
-
test_link_with_unstored
()[source]¶ It is possible to store links between nodes even if they are unstored; these links are cached. However, if working in the cache, an explicit link name must be provided.
-
test_node_get_inputs_link_type_unstored
()[source]¶ Test that the link_type parameter in get_inputs only returns those nodes with the correct link type for unstored nodes. We don’t check this analogously for get_outputs because there is not output links cache
-
test_node_get_inputs_outputs_link_type_stored
()[source]¶ Test that the link_type parameter in get_inputs and get_outputs only returns those nodes with the correct link type for stored nodes
-
test_store_with_unstored_parents
()[source]¶ I want to check that if parents are unstored I cannot store
-
-
class
aiida.backends.tests.nodes.
TestTransitiveNoLoops
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Test the transitive closure functionality
-
__module__
= 'aiida.backends.tests.nodes'¶
-
Tests for specific subclasses of Data
-
exception
aiida.backends.tests.parsers.
SkipTestException
[source]¶ Bases:
exceptions.Exception
-
__module__
= 'aiida.backends.tests.parsers'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
-
class
aiida.backends.tests.parsers.
TestParsers
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
This class dynamically finds all tests in a given subfolder, and loads them as different tests.
-
class
__metaclass__
[source]¶ Bases:
type
Some python black magic to dynamically create tests
-
__module__
= 'aiida.backends.tests.parsers'¶
-
-
__module__
= 'aiida.backends.tests.parsers'¶
-
longMessage
= True¶
-
class
-
aiida.backends.tests.parsers.
_comparison_AlmostEqual
(testclass, dbdata, comparisondata)[source]¶ Compare two numbers (or a list of numbers) to check that they are all almost equal (within a default precision of 7 digits)
-
aiida.backends.tests.parsers.
_comparison_Equal
(testclass, dbdata, comparisondata)[source]¶ Compare two objects to see if they are equal
-
aiida.backends.tests.parsers.
_comparison_LengthEqual
(testclass, dbdata, comparisondata)[source]¶ Check if the length of the object is equal to the value specified
-
aiida.backends.tests.parsers.
is_valid_folder_name
(name)[source]¶ Return True if the string (that will be the folder name of each subtest) is a valid name for a test function: it should start with
test_
, and contain only letters, digits or underscores.
-
aiida.backends.tests.parsers.
output_test
(pk, testname, skip_uuids_from_inputs=[])[source]¶ This is the function that should be used to create a new test from an existing calculation.
It is possible to simplify the file removing unwanted nodes.
Parameters: - pk – PK of Calculation, used for test
- testname – the name of this test, used to create a new folder. The folder name will be of the form test_PLUGIN_TESTNAME, with PLUGIN substituted by the plugin name, with dots replaced by underscores. Testname can contain only digits, letters and underscores.
- skip_uuids_from_inputs – a list of UUIDs of input nodes to be skipped
-
class
aiida.backends.tests.query.
QueryBuilderDateTimeAttribute
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.query'¶
-
-
class
aiida.backends.tests.query.
QueryBuilderJoinsTests
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.query'¶
-
-
class
aiida.backends.tests.query.
QueryBuilderLimitOffsetsTest
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.query'¶
-
-
class
aiida.backends.tests.query.
QueryBuilderPath
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.query'¶
-
-
class
aiida.backends.tests.query.
TestAttributes
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.query'¶
-
-
class
aiida.backends.tests.query.
TestConsistency
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.query'¶
-
-
class
aiida.backends.tests.query.
TestManager
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.query'¶
-
-
class
aiida.backends.tests.query.
TestQueryBuilder
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.query'¶
-
-
class
aiida.backends.tests.query.
TestQueryBuilderCornerCases
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
In this class corner cases of QueryBuilder are added.
-
__module__
= 'aiida.backends.tests.query'¶
-
test_computer_json
()[source]¶ In this test we check the correct behavior of QueryBuilder when retrieving the _metadata and the transport_params with no content. Note that they are in JSON format in both backends. Forcing the decoding of a None value leads to an exception (this was the case under Django).
-
-
class
aiida.backends.tests.restapi.
RESTApiTestCase
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Setup of the tests for the AiiDA RESTful-api
-
_LIMIT_DEFAULT
= 400¶
-
_PERPAGE_DEFAULT
= 20¶
-
__module__
= 'aiida.backends.tests.restapi'¶
-
_dummy_data
= {}¶
-
_url_prefix
= '/api/v2'¶
-
compare_extra_response_data
(node_type, url, response, uuid=None)[source]¶ In url response, we pass some extra information/data along with the node results. e.g. url method, node_type, path, pk, query_string, url, url_root, etc.
Parameters: - node_type – url requested fot the type of the node
- url – web url
- response – url response
- uuid – url requested for the node pk
-
node_exception
(url, exception_type)[source]¶ Assert exception if any unknown parameter is passed in url :param url: web url :param exception_type: exception to be thrown :return:
-
classmethod
process_dummy_data
()[source]¶ This functions prepare atomic chunks of typical responses from the RESTapi and puts them into class attributes
-
process_test
(node_type, url, full_list=False, empty_list=False, expected_list_ids=[], expected_range=[], expected_errormsg=None, uuid=None, result_node_type=None, result_name=None)[source]¶ Check whether response matches expected values.
Parameters: - node_type – url requested fot the type of the node
- url – web url
- full_list – if url is requested to get full list
- empty_list – if the response list is empty
- expected_list_ids – list of expected ids from data
- expected_range – [start, stop] range of expected ids from data
- expected_errormsg – expected error message in response
- uuid – url requested for the node pk
- result_node_type – node type in response data
- result_name – result name in response e.g. inputs, outputs
-
-
class
aiida.backends.tests.restapi.
RESTApiTestSuite
(methodName='runTest')[source]¶ Bases:
aiida.backends.tests.restapi.RESTApiTestCase
-
__module__
= 'aiida.backends.tests.restapi'¶
-
test_calculation_attributes_alist_filter
()[source]¶ Get list of calculation attributes with filter alist
-
test_calculation_attributes_nalist_filter
()[source]¶ Get list of calculation attributes with filter nalist
-
test_calculations_list_limit_offset
()[source]¶ Get the list of calculations from database using limit and offset parameter. It should return the no of rows specified in limit from database starting from the no. specified in offset
-
test_computers_filter_hostname
()[source]¶ Add filter for the hostname of computer and get the filtered computer list
-
test_computers_filter_id1
()[source]¶ Add filter on the id of computer and get the filtered computer list (e.g. id=1)
-
test_computers_filter_id2
()[source]¶ Add filter on the id of computer and get the filtered computer list (e.g. id > 2)
-
test_computers_filter_mixed1
()[source]¶ Add filter for the hostname and id of computer and get the filtered computer list
-
test_computers_filter_mixed2
()[source]¶ Add filter for the id, hostname and transport_type of the computer and get the filtered computer list
-
test_computers_filter_name
()[source]¶ Add filter for the name of computer and get the filtered computer list
-
test_computers_filter_pk
()[source]¶ Add filter on the id of computer and get the filtered computer list (e.g. id=1)
-
test_computers_filter_transport_type
()[source]¶ Add filter for the transport_type of computer and get the filtered computer list
-
test_computers_list_limit_offset
()[source]¶ Get the list of computers from database using limit and offset parameter. It should return the no of rows specified in limit from database starting from the no. specified in offset
-
test_computers_list_limit_offset_perpage
()[source]¶ If we pass the limit, offset and perpage at same time, it would return the error message.
-
test_computers_list_limit_only
()[source]¶ Get the list of computers from database using limit parameter. It should return the no of rows specified in limit from database.
-
test_computers_list_offset_only
()[source]¶ Get the list of computers from database using offset parameter It should return all the rows from database starting from the no. specified in offset
-
test_computers_list_page_default
()[source]¶ it returns the no. of rows defined as default perpage option from database.
no.of pages = total no. of computers in database / perpage “/page” acts as “/page/1?perpage=default_value”
-
test_computers_list_page_limit_offset
()[source]¶ If we use the page, limit and offset at same time, it would return the error message.
-
test_computers_list_page_limit_offset_perpage
()[source]¶ If we use the page, limit, offset and perpage at same time, it would return the error message.
-
test_computers_list_page_perpage
()[source]¶ no.of pages = total no. of computers in database / perpage Using this formula it returns the no. of rows for requested page
-
test_computers_list_page_perpage_exceed
()[source]¶ no.of pages = total no. of computers in database / perpage
If we request the page which exceeds the total no. of pages then it would return the error message.
-
test_computers_orderby_id_asc
()[source]¶ Returns the computers list ordered by “id” in ascending order
-
test_computers_orderby_id_asc_sign
()[source]¶ Returns the computers list ordered by “+id” in ascending order
-
test_computers_orderby_id_desc
()[source]¶ Returns the computers list ordered by “id” in descending order
-
test_computers_orderby_mixed1
()[source]¶ Returns the computers list first order by “transport_type” in ascending order and if it is having same transport_type, order it by “id”
-
test_computers_orderby_mixed2
()[source]¶ Returns the computers list first order by “scheduler_type” in descending order and if it is having same scheduler_type, order it by “name”
-
test_computers_orderby_mixed3
()[source]¶ Returns the computers list first order by “scheduler_type” in ascending order and if it is having same scheduler_type, order it by “hostname” descending order
Response:: test4 slurm test3 slurm test2 torque test1 pbspro localhost pbspro ========== Expected:: test1 pbspro localhost pbspro test4 slurm test3 slurm test2 torque test1 test4
- RESTApiTestCase.process_test(self, “computers”,
- “/computers?orderby=+scheduler_type, -hostname”, expected_list_ids=[1,0,4,3,2])
-
test_computers_orderby_name_asc
()[source]¶ Returns the computers list ordered by “name” in ascending order
-
test_computers_orderby_name_asc_sign
()[source]¶ Returns the computers list ordered by “+name” in ascending order
-
test_computers_orderby_name_desc
()[source]¶ Returns the computers list ordered by “name” in descending order
-
test_computers_orderby_scheduler_type_asc
()[source]¶ Returns the computers list ordered by “scheduler_type” in ascending order
-
test_computers_orderby_scheduler_type_asc_sign
()[source]¶ Returns the computers list ordered by “+scheduler_type” in ascending order
-
test_computers_orderby_scheduler_type_desc
()[source]¶ Returns the computers list ordered by “scheduler_type” in descending order
-
Tests for TestTcodDbExporter
-
class
aiida.backends.tests.tcodexporter.
FakeObject
(dictionary)[source]¶ Bases:
object
A wrapper for dictionary, which can be used instead of object. Example use case: fake Calculation object
calc
, having keysinp
andout
to access also fake NodeInputManager and NodeOutputManager.-
__dict__
= dict_proxy({'__module__': 'aiida.backends.tests.tcodexporter', '__getattr__': <function __getattr__>, '__dict__': <attribute '__dict__' of 'FakeObject' objects>, '__weakref__': <attribute '__weakref__' of 'FakeObject' objects>, '__doc__': '\n A wrapper for dictionary, which can be used instead of object.\n Example use case: fake Calculation object ``calc``, having keys\n ``inp`` and ``out`` to access also fake NodeInputManager and\n NodeOutputManager.\n ', '__init__': <function __init__>})¶
-
__module__
= 'aiida.backends.tests.tcodexporter'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
-
class
aiida.backends.tests.tcodexporter.
TestTcodDbExporter
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests for TcodDbExporter class.
-
__module__
= 'aiida.backends.tests.tcodexporter'¶
-
has_ase
()¶ Returns: True if the ase module can be imported, False otherwise.
-
has_pycifrw
()¶ Returns: True if the PyCifRW module can be imported, False otherwise.
-
has_spglib
()¶ Returns: True if the spglib module can be imported, False otherwise.
-
test_cmdline_parameters
()[source]¶ Ensuring that neither extend_with_cmdline_parameters() nor deposition_cmdline_parameters() set default parameters.
-
test_contents_encoding_1
()[source]¶ Testing the logic of choosing the encoding and the process of encoding contents.
-
-
class
aiida.backends.tests.test_caching_config.
CacheConfigTest
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
Tests the caching configuration.
-
__module__
= 'aiida.backends.tests.test_caching_config'¶
-
-
class
aiida.backends.tests.test_plugin_loader.
TestExistingPlugins
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Test pluginloader’s all_plugins function.
- will fail when any of the plugins distributed with aiida or installed from external plugin repositories, fails to load
- will fail if pluginloader returns something else than a list
-
__module__
= 'aiida.backends.tests.test_plugin_loader'¶
-
class
aiida.backends.tests.verdi_commands.
TestVerdiCalculationCommands
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.verdi_commands'¶
-
-
class
aiida.backends.tests.verdi_commands.
TestVerdiCodeCommands
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.verdi_commands'¶
-
-
class
aiida.backends.tests.verdi_commands.
TestVerdiDataCommands
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.verdi_commands'¶
-
cmd_to_nodeid_map
= {}¶
-
cmd_to_nodeid_map_for_groups
= {}¶
-
cmd_to_nodeid_map_for_nuser
= {}¶
-
classmethod
create_bands_data
(cmd_to_nodeid_map, cmd_to_nodeid_map_for_groups, cmd_to_nodeid_map_for_nuser, group, new_user)[source]¶
-
classmethod
create_cif_data
(cmd_to_nodeid_map, cmd_to_nodeid_map_for_groups, cmd_to_nodeid_map_for_nuser, group, new_user)[source]¶
-
classmethod
create_structure_data
(cmd_to_nodeid_map, cmd_to_nodeid_map_for_groups, cmd_to_nodeid_map_for_nuser, group, new_user)[source]¶
-
classmethod
create_trajectory_data
(cmd_to_nodeid_map, cmd_to_nodeid_map_for_groups, cmd_to_nodeid_map_for_nuser, group, new_user)[source]¶
-
group_id
= None¶
-
group_name
= 'trj_group'¶
-
-
class
aiida.backends.tests.verdi_commands.
TestVerdiUserCommands
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.verdi_commands'¶
-
-
class
aiida.backends.tests.verdi_commands.
TestVerdiWorkCommands
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.verdi_commands'¶
-
-
class
aiida.backends.tests.workflows.
TestWorkflowBasic
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
These tests check the basic features of workflows. Now only the load_workflow function is tested.
-
__module__
= 'aiida.backends.tests.workflows'¶
-
tearDown
()[source]¶ Cleaning the database after each test. Since I don’t want the workflows of one test to interfere with the workflows of the other tests.
-
test_failing_calc_in_wf
()[source]¶ This test checks that a workflow (but also a workflow with sub-workflows) that has an exception at one of its steps stops properly and it is not left as RUNNING.
-
test_listing_workflows
()[source]¶ Test ensuring that the workflow listing works as expected. (Listing initialized & running workflows and not listing finished workflows or workflows with errors).
-
test_result_parameter_name_colision
()[source]¶ This test checks that the the workflow parameters and results do not collide. This was a problem in SQLA (Issue #960) but a test for both backends is added (for completeness).
-
test_wf_get_state
()[source]¶ Simple test that checks the state of the workflows. We create two workflows since the test order in the SQLA was influencing the value of aiida.backends.sqlalchemy.models.workflow.DbWorkflow.state which should be a Choice object, according to the SQLA doc. Sometimes it was automatically converted to unicode.
Since we are interested to get a unicode from aiida.orm.implementation.general.workflow.AbstractWorkflow#get_state we enforce this conversion at aiida.orm.implementation.sqlalchemy.workflow.Workflow#get_state
For more info, check issue #951
-