message_ix_models.tests.test_report.test_collapse

message_ix_models.tests.test_report.test_collapse(input, exp)[source]

Test report.util.collapse() and use of REPLACE_VARS.

This test is parametrized with example input and expected output strings for the variable IAMC column. There should be ≥1 example for each pattern in REPLACE_VARS.

When adding test cases, if the pattern does not start with ^ or end with $, then prefix “x “ or suffix “ x” respectively to ensure these are handled as intended.

Todo

Extend or duplicate to also cover REPLACE_DIMS.