diff options
author | Mike Pennisi <mike@mikepennisi.com> | 2015-07-01 14:35:13 -0400 |
---|---|---|
committer | Mike Pennisi <mike@mikepennisi.com> | 2015-07-01 14:49:54 -0400 |
commit | 1303ef0d05eef7bbb455df6055485ffeabaa3c6d (patch) | |
tree | 76910791bb700ae166d780a5da5e718b058c77d9 /tools/packaging | |
parent | 1e80bf22f6c33b5b320f8a75dc43f365904653b2 (diff) | |
download | qtdeclarative-testsuites-1303ef0d05eef7bbb455df6055485ffeabaa3c6d.tar.gz |
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.
Diffstat (limited to 'tools/packaging')
-rw-r--r-- | tools/packaging/parseTestRecord.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tools/packaging/parseTestRecord.py b/tools/packaging/parseTestRecord.py index 3a76e85ab..681039d34 100644 --- a/tools/packaging/parseTestRecord.py +++ b/tools/packaging/parseTestRecord.py @@ -113,12 +113,8 @@ def importYamlLoad(): global yamlLoad if yamlLoad: return - try: - import yaml - yamlLoad = yaml.load - except: - monkeyYaml = loadMonkeyYaml() - yamlLoad = monkeyYaml.load + monkeyYaml = loadMonkeyYaml() + yamlLoad = monkeyYaml.load def loadMonkeyYaml(): f = None |