From bf95a8222db1ac624c073e1adb96ca9a33bc9191 Mon Sep 17 00:00:00 2001 From: Felienne Hermans Date: Mon, 25 Sep 2023 09:21:17 +0200 Subject: [PATCH] PEP8 fix --- tests/test_snippets/test_adventures.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_snippets/test_adventures.py b/tests/test_snippets/test_adventures.py index b0787c0a11e..0a341c12666 100644 --- a/tests/test_snippets/test_adventures.py +++ b/tests/test_snippets/test_adventures.py @@ -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 @@ -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))