From 0710a1529a7af7e33179c71a30d362dd46281d3f Mon Sep 17 00:00:00 2001 From: Adam Coldrick Date: Fri, 8 Aug 2014 09:58:59 +0000 Subject: unittests: Make the unittests use morphloader This commit removes all use of morph2 from the unittests, replacing it with morphloader/morph3. It also converts the test morphologies to YAML. --- morphlib/artifact_tests.py | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) (limited to 'morphlib/artifact_tests.py') diff --git a/morphlib/artifact_tests.py b/morphlib/artifact_tests.py index d4b15cba..62b1bfb9 100644 --- a/morphlib/artifact_tests.py +++ b/morphlib/artifact_tests.py @@ -23,24 +23,22 @@ import morphlib class ArtifactTests(unittest.TestCase): def setUp(self): - morph = morphlib.morph2.Morphology( - ''' - { - "name": "chunk", - "kind": "chunk", - "chunks": { - "chunk-runtime": [ - "usr/bin", - "usr/sbin", - "usr/lib", - "usr/libexec" - ], - "chunk-devel": [ - "usr/include" - ] - } - } - ''') + loader = morphlib.morphloader.MorphologyLoader() + morph = loader.load_from_string( + ''' + name: chunk + kind: chunk + products: + - artifact: chunk-runtime + include: + - usr/bin + - usr/sbin + - usr/lib + - usr/libexec + - artifact: chunk-devel + include: + - usr/include + ''') self.source = morphlib.source.Source( 'repo', 'ref', 'sha1', 'tree', morph, 'chunk.morph') self.artifact_name = 'chunk-runtime' -- cgit v1.2.1