comparison tests/basefs.py @ 1135:6350ee084273

tests: Don't use flow style for generated YAML markup.
author Ludovic Chabant <ludovic@chabant.com>
date Mon, 23 Apr 2018 21:37:43 -0700
parents 45ad976712ec
children
comparison
equal deleted inserted replaced
1134:986ecdaa2a36 1135:6350ee084273
51 def withConfig(self, config=None): 51 def withConfig(self, config=None):
52 if config is None: 52 if config is None:
53 config = {} 53 config = {}
54 return self.withFile( 54 return self.withFile(
55 'kitchen/config.yml', 55 'kitchen/config.yml',
56 yaml.dump(config)) 56 yaml.dump(config, default_flow_style=False))
57 57
58 def withThemeConfig(self, config): 58 def withThemeConfig(self, config):
59 return self.withFile( 59 return self.withFile(
60 'kitchen/theme_config.yml', 60 'kitchen/theme_config.yml',
61 yaml.dump(config)) 61 yaml.dump(config, default_flow_style=False))
62 62
63 def withPage(self, url, config=None, contents=None): 63 def withPage(self, url, config=None, contents=None):
64 config = config or {} 64 config = config or {}
65 contents = contents or "A test page." 65 contents = contents or "A test page."
66 text = "---\n" 66 text = "---\n"
67 text += yaml.dump(config) 67 text += yaml.dump(config, default_flow_style=False)
68 text += "---\n" 68 text += "---\n"
69 text += contents 69 text += contents
70 70
71 name, ext = os.path.splitext(url) 71 name, ext = os.path.splitext(url)
72 if not ext: 72 if not ext: