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.
get_codes() returns objects with the expected hierarchical relationship.
test_levels
()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.