Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dc-almeida committed Jan 15, 2025
1 parent cf6c691 commit 8579c8f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tests/test_codelist.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,15 +273,15 @@ def test_to_csv():
[
(
"tag_in_str",
r"Unexpected character\(s\) '{', '}' in variable.name of: 'Primary Energy\|{Feul}'",
r"Illegal character\(s\) '{', '}' in name of variable 'Primary Energy\|{Feul}'",
),
(
"tag_in_list",
r"Unexpected character\(s\) '{' in variable.info of: 'Share\|Coal'",
r"Illegal character\(s\) '{' in info of variable 'Share\|Coal'",
),
(
"tag_in_dict",
r"Unexpected character\(s\) '}' in variable.invalid of: 'Primary Energy'",
r"Illegal character\(s\) '}' in invalid of variable 'Primary Energy'",
),
],
)
Expand All @@ -296,9 +296,7 @@ def test_stray_tag_fails(subfolder, match):

def test_illegal_char_fails():
"""Check that illegal character raises expected error."""
match = (
r"Unexpected character\(s\) '\"' in variable.info of: 'Primary Energy\|Coal'"
)
match = r"Illegal character\(s\) '\"' in info of variable 'Primary Energy\|Coal'"
with raises(ValueError, match=match):
DataStructureDefinition(
MODULE_TEST_DATA_DIR / "illegal_chars" / "char_in_str" / "definitions"
Expand Down

0 comments on commit 8579c8f

Please sign in to comment.