Skip to content

Commit

Permalink
PEP8 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Felienne committed Sep 25, 2023
1 parent ecde9d9 commit bf95a82
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/test_snippets/test_adventures.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def collect_snippets(path, filtered_language=None):

return Hedy_snippets


# filtered_language = 'tr'
# use this to filter on 1 lang, zh_Hans for Chinese, nb_NO for Norwegian, pt_PT for Portuguese

Expand Down Expand Up @@ -113,11 +114,13 @@ def test_adventures(self, name, snippet):
if fix_error:
# Read English yaml file
original_yaml = YamlFile.for_file('../../content/adventures/en.yaml')
original_text = original_yaml['adventures'][snippet.key]['levels'][snippet.level][snippet.field_name]
original_text = original_yaml['adventures'][snippet.key]['levels'] \
[snippet.level][snippet.field_name]

# Read broken yaml file
broken_yaml = utils.load_yaml_rt(snippet.filename)
broken_yaml['adventures'][snippet.key]['levels'][snippet.level][snippet.field_name] = original_text
broken_yaml['adventures'][snippet.key]['levels'] \
[snippet.level][snippet.field_name] = original_text

with open(snippet.filename, 'w') as file:
file.write(utils.dump_yaml_rt(broken_yaml))
Expand Down

0 comments on commit bf95a82

Please sign in to comment.