summaryrefslogtreecommitdiff
path: root/morphlib/yamlparse_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'morphlib/yamlparse_tests.py')
-rw-r--r--morphlib/yamlparse_tests.py15
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