summaryrefslogtreecommitdiff
path: root/morphlib/morphology_tests.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2011-10-03 14:42:54 +0100
committerLars Wirzenius <liw@liw.fi>2011-10-03 14:42:54 +0100
commitc45e1325b9930c0008f9cfdbae2c527b3d62de6e (patch)
tree49c6617d7a62de939c42d4e8bb8276f171868ce0 /morphlib/morphology_tests.py
parent5003590ca0da16d58c07c48048310f1f6d6f0d32 (diff)
downloadmorph-c45e1325b9930c0008f9cfdbae2c527b3d62de6e.tar.gz
Add preliminary support for system morphologies.
No validation at this time. The current approach to implementing validation is too much work.
Diffstat (limited to 'morphlib/morphology_tests.py')
-rw-r--r--morphlib/morphology_tests.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/morphlib/morphology_tests.py b/morphlib/morphology_tests.py
index d7e256dd..2982bb27 100644
--- a/morphlib/morphology_tests.py
+++ b/morphlib/morphology_tests.py
@@ -374,6 +374,20 @@ class MorphologyTests(unittest.TestCase):
self.assertEqual(morph.kind, 'stratum')
self.assertEqual(morph.filename, 'mockfile')
+ def test_accepts_valid_system_morphology(self):
+ morph = morphlib.morphology.Morphology(
+ MockFile('''
+ {
+ "name": "hello",
+ "kind": "system",
+ "strata": [
+ "foo",
+ "bar"
+ ]
+ }'''))
+ self.assertEqual(morph.kind, 'system')
+ self.assertEqual(morph.strata, ['foo', 'bar'])
+
class StratumRepoTests(unittest.TestCase):