Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed Jul 17, 2024
1 parent 488964b commit 26f3594
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/test_definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def test_variable():
instance = read_instance(Path('definitions') / 'variable')

for row in instance:
sectors = row.get('sectors') + ['other']
sectors = row.get('sectors', []) + ['other']
if sectors:
for key, value in row.items():
if isinstance(value, dict):
Expand Down Expand Up @@ -92,8 +92,10 @@ def test_variable_groups():

for variable in variables:
group = variable.get('group')
assert group, variable.get('specifier')
assert group in group_specifiers
products = variable.get('products')
if products is None or 'OutputData' in products:
assert group, variable.get('specifier')
assert group in group_specifiers


def test_nested_simulation_rounds():
Expand Down

0 comments on commit 26f3594

Please sign in to comment.