message_ix_models.tests.model.test_structure.TestGetCodes

class message_ix_models.tests.model.test_structure.TestGetCodes[source]

Bases: object

Test get_codes() for different code lists.

__init__()

Methods

__init__()

test_commodities()

test_get_codes(name)

The included code lists can be loaded.

test_hierarchy()

get_codes() returns objects with the expected hierarchical relationship.

test_levels()

test_node_historic_country()

get_codes() handles ISO 3166 alpha-3 codes for historic countries.

test_nodes(codelist, to_check, length, member)

Tests of node codelists.

test_relation(codelist, length, expected)

test_technologies()

test_year(codelist, length)

Year code lists can be loaded and contain the correct number of codes.

test_get_codes(name)[source]

The included code lists can be loaded.

test_hierarchy()[source]

get_codes() returns objects with the expected hierarchical relationship.

test_node_historic_country()[source]

get_codes() handles ISO 3166 alpha-3 codes for historic countries.

test_nodes(codelist, to_check, length, member)[source]

Tests of node codelists.

test_year(codelist, length)[source]

Year code lists can be loaded and contain the correct number of codes.

Seealso:

TestScenarioInfo.test_year_from_codes().