Skip to content
Snippets Groups Projects
Commit 1303ef0d authored by Mike Pennisi's avatar Mike Pennisi
Browse files

Use "monkeyYaml" in all environments

The "monkeyYaml" parser is intended to serve as a lightweight fallback
to Python's standard YAML parser in contexts where the latter is not
available. Any intentionally-simplified implementation will necessarily
exhibit non-standard behavior for different input, so not all input
accepted by the standard parser will be accepted by "monkeyYaml". If
loaded exclusively in fallback situations, these edge cases can only be
identified (and debugged) in the environments that require the fallback.
This has allowed developers to unknowingly author tests that cause
errors.

Update the test runner to use "monkeyYaml" in all cases, ensuring more
consistent behavior across contexts and precluding this class of
regression.
parent 1e80bf22
No related branches found
No related tags found
No related merge requests found
...@@ -113,12 +113,8 @@ def importYamlLoad(): ...@@ -113,12 +113,8 @@ def importYamlLoad():
global yamlLoad global yamlLoad
if yamlLoad: if yamlLoad:
return return
try: monkeyYaml = loadMonkeyYaml()
import yaml yamlLoad = monkeyYaml.load
yamlLoad = yaml.load
except:
monkeyYaml = loadMonkeyYaml()
yamlLoad = monkeyYaml.load
def loadMonkeyYaml(): def loadMonkeyYaml():
f = None f = None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment