iiasa / message_ix

The integrated assessment and energy systems model MESSAGEix
https://docs.messageix.org
Apache License 2.0
119 stars 153 forks source link

Make test more specific to avoid error #767

Closed glatterf42 closed 9 months ago

glatterf42 commented 9 months ago

The recent dask update has brought to light an issue with one of our tests. test_macro.py:test_config wants to test, among others, that a missing column is causing a related error message. However, the test deletes three columns from the config and with the recent update, a different column from the expected one is picked up for the error message. This PR changes the test to delete only the one column from the config that we expect in the error message.

How to review

PR checklist

codecov[bot] commented 9 months ago

Codecov Report

Merging #767 (19391bf) into main (6b4f630) will not change coverage. The diff coverage is 100.0%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #767 +/- ## ===================================== Coverage 95.2% 95.2% ===================================== Files 46 46 Lines 4312 4312 ===================================== Hits 4107 4107 Misses 205 205 ``` | [Files](https://app.codecov.io/gh/iiasa/message_ix/pull/767?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iiasa) | Coverage Δ | | |---|---|---| | [message\_ix/tests/test\_macro.py](https://app.codecov.io/gh/iiasa/message_ix/pull/767?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iiasa#diff-bWVzc2FnZV9peC90ZXN0cy90ZXN0X21hY3JvLnB5) | `100.0% <100.0%> (ø)` | |