Skip to content

Commit

Permalink
Format RegionNotDefined error (#391)
Browse files Browse the repository at this point in the history
* Format RegionNotDefined error

* Update region processor test
  • Loading branch information
dc-almeida authored Sep 17, 2024
1 parent fd4ada8 commit 8d31735
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nomenclature/error.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
),
"RegionNotDefinedError": (
"region_not_defined",
"Region(s) {regions} in {file} not found in RegionCodeList",
"Region(s)\n{regions}\nin {file}\nnot found in RegionCodeList",
),
}

Expand Down
4 changes: 2 additions & 2 deletions tests/test_region_aggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ def test_region_processor_not_defined(simple_definition):
# definition
error_msg = (
"mappings.model_(a|b).*\n"
".*region_a.*mapping_(1|2).yaml.*region_not_defined.*\n"
".*\n.*region_a.*\n.*mapping_(1|2).yaml\n.*region_not_defined.*\n"
"mappings.model_(a|b).*\n"
".*region_a.*mapping_(1|2).yaml.*region_not_defined"
".*\n.*region_a.*\n.*mapping_(1|2).yaml\n.*region_not_defined"
)

with pytest.raises(ValueError, match=error_msg):
Expand Down

0 comments on commit 8d31735

Please sign in to comment.