diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2013-01-29 18:03:22 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2013-01-29 18:04:18 +0000 |
commit | ee01dea68ecd0822785ef574f7c2ddcb44d0cafa (patch) | |
tree | 49f08d357cc8ad068b36c1c9df7ead9d1b72d077 /morphlib/yamlparse_tests.py | |
parent | a50a5411db21f4cde449d1bb26f85b8bbee275ac (diff) | |
parent | e06eafcbf0784271f51c0936852d1e97c0ccce8b (diff) | |
download | morph-ee01dea68ecd0822785ef574f7c2ddcb44d0cafa.tar.gz |
Merge branch 'liw/soft-pyyaml-dep'
Merge commit fixes up a copyright year and removes EOL whitespace
Diffstat (limited to 'morphlib/yamlparse_tests.py')
-rw-r--r-- | morphlib/yamlparse_tests.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/morphlib/yamlparse_tests.py b/morphlib/yamlparse_tests.py index cb658e15..f5c2569b 100644 --- a/morphlib/yamlparse_tests.py +++ b/morphlib/yamlparse_tests.py @@ -15,17 +15,20 @@ import unittest -try: - from collections import OrderedDict -except ImportError: - from ordereddict import OrderedDict -import yaml - +import morphlib import morphlib.yamlparse as yamlparse +from morphlib.util import OrderedDict + +if morphlib.got_yaml: + yaml = morphlib.yaml class YAMLParseTests(unittest.TestCase): + def run(self, *args, **kwargs): + if morphlib.got_yaml: + return unittest.TestCase.run(self, *args, **kwargs) + example_text = '''\ name: foo kind: chunk |