Skip to content

Commit

Permalink
Making the error message informative (#466)
Browse files Browse the repository at this point in the history
  • Loading branch information
swarooprm authored Oct 21, 2021
1 parent 8ea85db commit fac83ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ def extract_categories(string):
for d in data['Domains']:
assert d in hierarchy_content, f'Did not find domain `{d}`'

assert type(data['Input_language']) == list, f'Input_language must be a str.'
assert type(data['Output_language']) == list, f'Output_language must be a str.'
assert type(data['Instruction_language']) == list, f'Output_language must be a str.'
assert type(data['Input_language']) == list, f'Input_language must be a list of strings.'
assert type(data['Output_language']) == list, f'Output_language must be a list of strings.'
assert type(data['Instruction_language']) == list, f'Output_language must be a list of strings.'

assert 'instruction_language' not in data, f'Found `instruction_language`, but expected `Instruction_language`.'
assert 'input_language' not in data, f'Found `input_language`, but expected `Input_language`.'
Expand Down

0 comments on commit fac83ac

Please sign in to comment.