summaryrefslogtreecommitdiff
path: root/morphlib/morphologyfactory_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'morphlib/morphologyfactory_tests.py')
-rw-r--r--morphlib/morphologyfactory_tests.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/morphlib/morphologyfactory_tests.py b/morphlib/morphologyfactory_tests.py
index b00a496a..39331262 100644
--- a/morphlib/morphologyfactory_tests.py
+++ b/morphlib/morphologyfactory_tests.py
@@ -63,6 +63,9 @@ class FakeLocalRepo(object):
"system-kind": "%(system_kind)s",
"arch": "%(arch)s"
}''',
+ 'parse-error.morph': '''{
+ "name"
+ }''',
}
def __init__(self):
@@ -229,3 +232,8 @@ class MorphologyFactoryTests(unittest.TestCase):
self.lr.system_kind = ''
self.assertRaises(morphlib.Error, self.mf.get_morphology,
'reponame', 'sha1', 'system.morph')
+
+ def test_fails_on_parse_error(self):
+ self.assertRaises(morphlib.Error, self.mf.get_morphology,
+ 'reponame', 'sha1', 'parse-error.morph')
+