aiida.backends.tests.orm.data package

Submodules

Tests for the Dict class.

class aiida.backends.tests.orm.data.test_dict.TestDict(methodName='runTest')[source]

Bases: aiida.backends.testbase.AiidaTestCase

Test for the Dict class.

__module__ = 'aiida.backends.tests.orm.data.test_dict'
classmethod setUpClass(*args, **kwargs)[source]

Hook method for setting up class fixture before running tests in the class.

test_dict_property()[source]

Test the dict property.

test_get_dict()[source]

Test the get_dict method.

test_get_item()[source]

Test the __getitem__ method.

test_keys()[source]

Test the keys method.

Tests for the KpointsData class.

class aiida.backends.tests.orm.data.test_kpoints.TestKpoints(methodName='runTest')[source]

Bases: aiida.backends.testbase.AiidaTestCase

Test for the Kpointsdata class.

__module__ = 'aiida.backends.tests.orm.data.test_kpoints'
classmethod setUpClass(*args, **kwargs)[source]

Hook method for setting up class fixture before running tests in the class.

test_get_kpoints()[source]

Test the get_kpoints method.

test_reciprocal_cell()[source]

Test the reciprocal_cell method.

This is a regression test for #2749.

Tests for the OrbitalData class.

class aiida.backends.tests.orm.data.test_orbital.TestOrbitalData(methodName='runTest')[source]

Bases: aiida.backends.testbase.AiidaTestCase

Test for the OrbitalData class.

__module__ = 'aiida.backends.tests.orm.data.test_orbital'
classmethod setUpClass(*args, **kwargs)[source]

Hook method for setting up class fixture before running tests in the class.

test_real_hydrogen()[source]

Tests storage of the RealHydrogen oribtal

class aiida.backends.tests.orm.data.test_remote.TestRemoteData(methodName='runTest')[source]

Bases: aiida.backends.testbase.AiidaTestCase

Test for the RemoteData class.

__module__ = 'aiida.backends.tests.orm.data.test_remote'
setUp()[source]

Create a dummy RemoteData on the default computer.

classmethod setUpClass()[source]

Hook method for setting up class fixture before running tests in the class.

tearDown()[source]

Delete the temporary path for the dummy RemoteData node.

test_clean()[source]

Try cleaning a RemoteData node.

Tests for the SinglefileData class.

class aiida.backends.tests.orm.data.test_singlefile.TestSinglefileData(methodName='runTest')[source]

Bases: aiida.backends.testbase.AiidaTestCase

Tests for the SinglefileData class.

__module__ = 'aiida.backends.tests.orm.data.test_singlefile'
test_binary_file()[source]

Test that the constructor accepts binary files.

test_construct_from_filelike()[source]

Test constructing an instance from filelike instead of filepath.

test_construct_from_string()[source]

Test constructing an instance from a string.

test_reload_singlefile_data()[source]

Test writing and reloading a SinglefileData instance.

This module contains tests for the to_aiida_type serializer

class aiida.backends.tests.orm.data.test_to_aiida_type.TestToAiiDAType(methodName='runTest')[source]

Bases: aiida.backends.testbase.AiidaTestCase

Test the to_aiida_type serialize that converts python objects to AiiDA nodes

__module__ = 'aiida.backends.tests.orm.data.test_to_aiida_type'
test_bool()[source]

Test converting bool to Bool

test_dict()[source]

Test converting dict to Dict

test_flot()[source]

Test converting float to Float

test_int()[source]

Test integer

test_str()[source]

Test converting string to Str

This module contains tests for UpfData and UpfData related functions.

class aiida.backends.tests.orm.data.test_upf.TestUpfParser(methodName='runTest')[source]

Bases: aiida.backends.testbase.AiidaTestCase

Tests UPF version / element_name parser function.

__module__ = 'aiida.backends.tests.orm.data.test_upf'
setUp()[source]

Setup a temporary directory to store UPF files.

classmethod setUpClass(*args, **kwargs)[source]

Hook method for setting up class fixture before running tests in the class.

tearDown()[source]

Destroy the temporary directory created.

test_additional_header_line()[source]

Regression #2228: check if parsing succeeds if additional header line is present.

test_check_filename()[source]

Test built-in check for if file name matches element

test_get_upf_groups()[source]

Test the UpfData.get_upf_groups class method.

test_invalid_element_upf_v1()[source]

Test parsers exception on invalid element name in UPF v1.

test_invalid_element_upf_v2()[source]

Test parsers exception on invalid element name in UPF v2.

test_missing_element_upf_v1()[source]

Test parsers exception on missing element name in UPF v1.

test_missing_element_upf_v2()[source]

Test parsers exception on missing element name in UPF v2.

test_upf_version_one()[source]

Check if parsing for regular UPF file (version 1) succeeds.

test_upf_version_two()[source]

Check if parsing for regular UPF file (version 2) succeeds.