message_ix_models.tests.test_util

Tests of message_ix_models.util.

Functions

test_as_codes()

Forward reference to a child is silently dropped.

test_as_codes_invalid(data)

as_codes() rejects invalid data.

test_broadcast(caplog)

test_check_support(test_context)

check_support() raises an exception for missing/non-matching values.

test_convert_units(recwarn)

convert_units() and series_of_pint_quantity() work.

test_copy_column()

test_ffill()

test_iter_parameters(test_context)

Parameters indexed by set 'node' can be retrieved.

test_load_package_data(path)

Existing package data can be loaded.

test_load_package_data_invalid()

load_package_data() raises an exception for an unsupported file type.

test_load_package_data_twice(caplog)

Loading the same data twice logs a message.

test_load_private_data(*parts[, suffix])

test_local_data_path(tmp_path_factory, ...)

test_make_source_tech0()

test_make_source_tech1(test_mp)

Test make_source_tech() with a Scenario object as input.

test_maybe_query()

maybe_query() works as intended.

test_package_data_path()

test_path_fallback(caplog)

test_private_data_path()

test_replace_par_data(caplog, test_context)

Test replace_par_data().

test_same(name, func, col)

Test both same_node() and same_time().

test_strip_par_data(caplog, test_context)

Test the "dry run" feature of strip_par_data().