diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2012-07-31 12:52:12 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2012-08-01 13:12:03 +0000 |
commit | 0032ccbd60f202ec76d9b738cddc8bdbf9f54133 (patch) | |
tree | cd398ab063be0bdab20b91cbd2420ad4981de813 /morphlib/artifactresolver_tests.py | |
parent | 93a3d28ee51cc301cd79ff8bfabb2010defda09b (diff) | |
download | morph-0032ccbd60f202ec76d9b738cddc8bdbf9f54133.tar.gz |
python scripts: pep8ize codebase
This was done with the aid of the pep8 script, available by running
`easy_install pep8`.
It may be worth making this part of ./check, but that will require
putting pep8 into the development tools stratum.
This should be easy, given pep8 has no external dependencies.
Diffstat (limited to 'morphlib/artifactresolver_tests.py')
-rw-r--r-- | morphlib/artifactresolver_tests.py | 420 |
1 files changed, 210 insertions, 210 deletions
diff --git a/morphlib/artifactresolver_tests.py b/morphlib/artifactresolver_tests.py index 055343dc..5869cb27 100644 --- a/morphlib/artifactresolver_tests.py +++ b/morphlib/artifactresolver_tests.py @@ -1,14 +1,14 @@ # Copyright (C) 2012 Codethink Limited -# +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -47,7 +47,7 @@ class FakeChunkMorphology(morphlib.morph2.Morphology): ''' % name) self.builds_artifacts = [name] morphlib.morph2.Morphology.__init__(self, text) - + class FakeStratumMorphology(morphlib.morph2.Morphology): @@ -99,10 +99,10 @@ class ArtifactResolverTests(unittest.TestCase): def test_resolve_single_chunk_with_no_subartifacts(self): pool = morphlib.sourcepool.SourcePool() - + morph = FakeChunkMorphology('chunk') source = morphlib.source.Source( - 'repo', 'ref', 'sha1', morph, 'chunk.morph') + 'repo', 'ref', 'sha1', morph, 'chunk.morph') pool.add(source) artifacts = self.resolver.resolve_artifacts(pool) @@ -116,10 +116,10 @@ class ArtifactResolverTests(unittest.TestCase): def test_resolve_single_chunk_with_one_artifact(self): pool = morphlib.sourcepool.SourcePool() - + morph = FakeChunkMorphology('chunk', ['chunk-runtime']) source = morphlib.source.Source( - 'repo', 'ref', 'sha1', morph, 'chunk.morph') + 'repo', 'ref', 'sha1', morph, 'chunk.morph') pool.add(source) artifacts = self.resolver.resolve_artifacts(pool) @@ -132,10 +132,10 @@ class ArtifactResolverTests(unittest.TestCase): def test_resolve_single_chunk_with_two_artifact(self): pool = morphlib.sourcepool.SourcePool() - + morph = FakeChunkMorphology('chunk', ['chunk-runtime', 'chunk-devel']) source = morphlib.source.Source( - 'repo', 'ref', 'sha1', morph, 'chunk.morph') + 'repo', 'ref', 'sha1', morph, 'chunk.morph') pool.add(source) artifacts = self.resolver.resolve_artifacts(pool) @@ -157,15 +157,15 @@ class ArtifactResolverTests(unittest.TestCase): pool = morphlib.sourcepool.SourcePool() morph = morphlib.morph2.Morphology( - ''' - { - "name": "foo", - "kind": "stratum" - } - ''') + ''' + { + "name": "foo", + "kind": "stratum" + } + ''') morph.builds_artifacts = ['foo'] stratum = morphlib.source.Source( - 'repo', 'original/ref', 'sha1', morph, 'foo.morph') + 'repo', 'original/ref', 'sha1', morph, 'foo.morph') pool.add(stratum) artifacts = self.resolver.resolve_artifacts(pool) @@ -179,15 +179,15 @@ class ArtifactResolverTests(unittest.TestCase): pool = morphlib.sourcepool.SourcePool() morph = morphlib.morph2.Morphology( - ''' - { - "name": "foo", - "kind": "system" - } - ''') + ''' + { + "name": "foo", + "kind": "system" + } + ''') morph.builds_artifacts = ['foo-rootfs'] system = morphlib.source.Source( - 'repo', 'original/ref', 'sha1', morph, 'foo.morph') + 'repo', 'original/ref', 'sha1', morph, 'foo.morph') pool.add(system) artifacts = self.resolver.resolve_artifacts(pool) @@ -201,39 +201,39 @@ class ArtifactResolverTests(unittest.TestCase): pool = morphlib.sourcepool.SourcePool() morph = morphlib.morph2.Morphology( - ''' - { - "name": "foo", - "kind": "system", - "arch": "arm" - } - ''') + ''' + { + "name": "foo", + "kind": "system", + "arch": "arm" + } + ''') morph.builds_artifacts = ['foo-rootfs', 'foo-kernel'] system = morphlib.source.Source( - 'repo', 'original/ref', 'sha1', morph, 'foo.morph') + 'repo', 'original/ref', 'sha1', morph, 'foo.morph') pool.add(system) artifacts = self.resolver.resolve_artifacts(pool) self.assertTrue(any((a.source == system and a.name == 'foo-rootfs' and a.dependencies == [] and a.dependents == []) - for a in artifacts)) + for a in artifacts)) self.assertTrue(any((a.source == system and a.name == 'foo-kernel' and a.dependencies == [] and a.dependents == []) - for a in artifacts)) + for a in artifacts)) def test_resolve_stratum_and_chunk_with_no_subartifacts(self): pool = morphlib.sourcepool.SourcePool() - + morph = FakeChunkMorphology('chunk') chunk = morphlib.source.Source( - 'repo', 'ref', 'sha1', morph, 'chunk.morph') + 'repo', 'ref', 'sha1', morph, 'chunk.morph') pool.add(chunk) morph = FakeStratumMorphology( - 'stratum', [('chunk', 'chunk', 'repo', 'ref')]) + 'stratum', [('chunk', 'chunk', 'repo', 'ref')]) stratum = morphlib.source.Source( - 'repo', 'ref', 'sha1', morph, 'stratum.morph') + 'repo', 'ref', 'sha1', morph, 'stratum.morph') pool.add(stratum) artifacts = self.resolver.resolve_artifacts(pool) @@ -252,19 +252,19 @@ class ArtifactResolverTests(unittest.TestCase): def test_resolve_stratum_and_chunk_with_two_subartifacts(self): pool = morphlib.sourcepool.SourcePool() - + morph = FakeChunkMorphology('chunk', ['chunk-devel', 'chunk-runtime']) chunk = morphlib.source.Source( - 'repo', 'ref', 'sha1', morph, 'chunk.morph') + 'repo', 'ref', 'sha1', morph, 'chunk.morph') pool.add(chunk) morph = FakeStratumMorphology( - 'stratum', [ - ('chunk-devel', 'chunk', 'repo', 'ref'), - ('chunk-runtime', 'chunk', 'repo', 'ref') - ]) + 'stratum', [ + ('chunk-devel', 'chunk', 'repo', 'ref'), + ('chunk-runtime', 'chunk', 'repo', 'ref') + ]) stratum = morphlib.source.Source( - 'repo', 'ref', 'sha1', morph, 'stratum.morph') + 'repo', 'ref', 'sha1', morph, 'stratum.morph') pool.add(stratum) artifacts = self.resolver.resolve_artifacts(pool) @@ -289,18 +289,18 @@ class ArtifactResolverTests(unittest.TestCase): def test_resolve_stratum_and_chunk_with_one_used_subartifacts(self): pool = morphlib.sourcepool.SourcePool() - + morph = FakeChunkMorphology('chunk', ['chunk-devel', 'chunk-runtime']) chunk = morphlib.source.Source( - 'repo', 'ref', 'sha1', morph, 'chunk.morph') + 'repo', 'ref', 'sha1', morph, 'chunk.morph') pool.add(chunk) morph = FakeStratumMorphology( - 'stratum', [ - ('chunk-runtime', 'chunk', 'repo', 'ref') - ]) + 'stratum', [ + ('chunk-runtime', 'chunk', 'repo', 'ref') + ]) stratum = morphlib.source.Source( - 'repo', 'ref', 'sha1', morph, 'stratum.morph') + 'repo', 'ref', 'sha1', morph, 'stratum.morph') pool.add(stratum) artifacts = self.resolver.resolve_artifacts(pool) @@ -319,24 +319,24 @@ class ArtifactResolverTests(unittest.TestCase): def test_resolving_two_different_chunk_artifacts_in_a_stratum(self): pool = morphlib.sourcepool.SourcePool() - + morph = FakeChunkMorphology('foo') foo_chunk = morphlib.source.Source( - 'repo', 'ref', 'sha1', morph, 'foo.morph') + 'repo', 'ref', 'sha1', morph, 'foo.morph') pool.add(foo_chunk) morph = FakeChunkMorphology('bar') bar_chunk = morphlib.source.Source( - 'repo', 'ref', 'sha1', morph, 'bar.morph') + 'repo', 'ref', 'sha1', morph, 'bar.morph') pool.add(bar_chunk) morph = FakeStratumMorphology( - 'stratum', [ - ('foo', 'foo', 'repo', 'ref'), - ('bar', 'bar', 'repo', 'ref') - ]) + 'stratum', [ + ('foo', 'foo', 'repo', 'ref'), + ('bar', 'bar', 'repo', 'ref') + ]) stratum = morphlib.source.Source( - 'repo', 'ref', 'sha1', morph, 'stratum.morph') + 'repo', 'ref', 'sha1', morph, 'stratum.morph') pool.add(stratum) artifacts = self.resolver.resolve_artifacts(pool) @@ -361,15 +361,15 @@ class ArtifactResolverTests(unittest.TestCase): def test_resolving_artifacts_for_a_chain_of_two_strata(self): pool = morphlib.sourcepool.SourcePool() - + morph = FakeStratumMorphology('stratum1') stratum1 = morphlib.source.Source( - 'repo', 'ref', 'sha1', morph, 'stratum1.morph') + 'repo', 'ref', 'sha1', morph, 'stratum1.morph') pool.add(stratum1) morph = FakeStratumMorphology('stratum2', [], ['stratum1']) stratum2 = morphlib.source.Source( - 'repo', 'ref', 'sha1', morph, 'stratum2.morph') + 'repo', 'ref', 'sha1', morph, 'stratum2.morph') pool.add(stratum2) artifacts = self.resolver.resolve_artifacts(pool) @@ -391,26 +391,26 @@ class ArtifactResolverTests(unittest.TestCase): morph = FakeStratumMorphology('stratum1') stratum1 = morphlib.source.Source( - 'repo', 'original/ref', 'sha1', morph, 'stratum1.morph') + 'repo', 'original/ref', 'sha1', morph, 'stratum1.morph') pool.add(stratum1) morph = FakeStratumMorphology( - 'stratum2', [ - ('chunk1', 'chunk1', 'repo', 'original/ref'), - ('chunk2', 'chunk2', 'repo', 'original/ref') - ], ['stratum1']) + 'stratum2', [ + ('chunk1', 'chunk1', 'repo', 'original/ref'), + ('chunk2', 'chunk2', 'repo', 'original/ref') + ], ['stratum1']) stratum2 = morphlib.source.Source( - 'repo', 'original/ref', 'sha1', morph, 'stratum2.morph') + 'repo', 'original/ref', 'sha1', morph, 'stratum2.morph') pool.add(stratum2) morph = FakeChunkMorphology('chunk1') chunk1 = morphlib.source.Source( - 'repo', 'original/ref', 'sha1', morph, 'chunk1.morph') + 'repo', 'original/ref', 'sha1', morph, 'chunk1.morph') pool.add(chunk1) morph = FakeChunkMorphology('chunk2') chunk2 = morphlib.source.Source( - 'repo', 'original/ref', 'sha1', morph, 'chunk2.morph') + 'repo', 'original/ref', 'sha1', morph, 'chunk2.morph') pool.add(chunk2) artifacts = self.resolver.resolve_artifacts(pool) @@ -421,19 +421,19 @@ class ArtifactResolverTests(unittest.TestCase): self.assertEqual(artifacts[0].name, 'stratum1') self.assertEqual(artifacts[0].dependencies, []) self.assertEqual(artifacts[0].dependents, - [artifacts[1], artifacts[2], artifacts[3]]) + [artifacts[1], artifacts[2], artifacts[3]]) self.assertEqual(artifacts[1].source, stratum2) self.assertEqual(artifacts[1].name, 'stratum2') self.assertEqual(artifacts[1].dependencies, [artifacts[0], artifacts[2], artifacts[3]]) self.assertEqual(artifacts[1].dependents, []) - + self.assertEqual(artifacts[2].source, chunk1) self.assertEqual(artifacts[2].name, 'chunk1') self.assertEqual(artifacts[2].dependencies, [artifacts[0]]) self.assertEqual(artifacts[2].dependents, [artifacts[1], artifacts[3]]) - + self.assertEqual(artifacts[3].source, chunk2) self.assertEqual(artifacts[3].name, 'chunk2') self.assertEqual(artifacts[3].dependencies, @@ -442,31 +442,31 @@ class ArtifactResolverTests(unittest.TestCase): def test_resolving_artifacts_for_a_system_with_two_strata(self): pool = morphlib.sourcepool.SourcePool() - + morph = FakeStratumMorphology('stratum1') stratum1 = morphlib.source.Source( - 'repo', 'ref', 'sha1', morph, 'stratum1.morph') + 'repo', 'ref', 'sha1', morph, 'stratum1.morph') pool.add(stratum1) morph = morphlib.morph2.Morphology( - ''' - { - "name": "system", - "kind": "system", - "strata": [ - "stratum1", - "stratum2" - ] - } - ''') + ''' + { + "name": "system", + "kind": "system", + "strata": [ + "stratum1", + "stratum2" + ] + } + ''') morph.builds_artifacts = ['system-rootfs'] system = morphlib.source.Source( - 'repo', 'ref', 'sha1', morph, 'system.morph') + 'repo', 'ref', 'sha1', morph, 'system.morph') pool.add(system) morph = FakeStratumMorphology('stratum2', [], ['stratum1']) stratum2 = morphlib.source.Source( - 'repo', 'ref', 'sha1', morph, 'stratum2.morph') + 'repo', 'ref', 'sha1', morph, 'stratum2.morph') pool.add(stratum2) artifacts = self.resolver.resolve_artifacts(pool) @@ -493,53 +493,53 @@ class ArtifactResolverTests(unittest.TestCase): pool = morphlib.sourcepool.SourcePool() morph = morphlib.morph2.Morphology( - ''' - { - "name": "stratum", - "kind": "stratum", - "sources": [ - { - "name": "chunk1", - "repo": "repo", - "ref": "original/ref", - "build-depends": [] - }, - { - "name": "chunk2", - "repo": "repo", - "ref": "original/ref", - "build-depends": [] - }, - { - "name": "chunk3", - "repo": "repo", - "ref": "original/ref", - "build-depends": [ - "chunk1", - "chunk2" - ] - } - ] - } - ''') + ''' + { + "name": "stratum", + "kind": "stratum", + "sources": [ + { + "name": "chunk1", + "repo": "repo", + "ref": "original/ref", + "build-depends": [] + }, + { + "name": "chunk2", + "repo": "repo", + "ref": "original/ref", + "build-depends": [] + }, + { + "name": "chunk3", + "repo": "repo", + "ref": "original/ref", + "build-depends": [ + "chunk1", + "chunk2" + ] + } + ] + } + ''') morph.builds_artifacts = ['stratum'] stratum = morphlib.source.Source( - 'repo', 'original/ref', 'sha1', morph, 'stratum.morph') + 'repo', 'original/ref', 'sha1', morph, 'stratum.morph') pool.add(stratum) morph = FakeChunkMorphology('chunk1') chunk1 = morphlib.source.Source( - 'repo', 'original/ref', 'sha1', morph, 'chunk1.morph') + 'repo', 'original/ref', 'sha1', morph, 'chunk1.morph') pool.add(chunk1) morph = FakeChunkMorphology('chunk2') chunk2 = morphlib.source.Source( - 'repo', 'original/ref', 'sha1', morph, 'chunk2.morph') + 'repo', 'original/ref', 'sha1', morph, 'chunk2.morph') pool.add(chunk2) morph = FakeChunkMorphology('chunk3') chunk3 = morphlib.source.Source( - 'repo', 'original/ref', 'sha1', morph, 'chunk3.morph') + 'repo', 'original/ref', 'sha1', morph, 'chunk3.morph') pool.add(chunk3) artifacts = self.resolver.resolve_artifacts(pool) @@ -571,35 +571,35 @@ class ArtifactResolverTests(unittest.TestCase): def test_detection_of_invalid_chunk_artifact_references(self): pool = morphlib.sourcepool.SourcePool() - + morph = FakeChunkMorphology('chunk') chunk = morphlib.source.Source( - 'repo', 'ref', 'sha1', morph, 'chunk.morph') + 'repo', 'ref', 'sha1', morph, 'chunk.morph') pool.add(chunk) morph = FakeStratumMorphology( - 'stratum', [ - ('chunk-runtime', 'chunk', 'repo', 'ref') - ]) + 'stratum', [ + ('chunk-runtime', 'chunk', 'repo', 'ref') + ]) stratum = morphlib.source.Source( - 'repo', 'ref', 'sha1', morph, 'stratum.morph') + 'repo', 'ref', 'sha1', morph, 'stratum.morph') pool.add(stratum) self.assertRaises( - morphlib.artifactresolver.UndefinedChunkArtifactError, - self.resolver.resolve_artifacts, pool) + morphlib.artifactresolver.UndefinedChunkArtifactError, + self.resolver.resolve_artifacts, pool) def test_detection_of_mutual_dependency_between_two_strata(self): pool = morphlib.sourcepool.SourcePool() morph = FakeStratumMorphology('stratum1', [], ['stratum2']) stratum1 = morphlib.source.Source( - 'repo', 'original/ref', 'sha1', morph, 'stratum1.morph') + 'repo', 'original/ref', 'sha1', morph, 'stratum1.morph') pool.add(stratum1) morph = FakeStratumMorphology('stratum2', [], ['stratum1']) stratum2 = morphlib.source.Source( - 'repo', 'original/ref', 'sha1', morph, 'stratum2.morph') + 'repo', 'original/ref', 'sha1', morph, 'stratum2.morph') pool.add(stratum2) self.assertRaises(morphlib.artifactresolver.MutualDependencyError, @@ -609,31 +609,31 @@ class ArtifactResolverTests(unittest.TestCase): pool = morphlib.sourcepool.SourcePool() morph = FakeStratumMorphology( - 'stratum1', [ - ('chunk1', 'chunk1', 'repo', 'original/ref'), - ('chunk2', 'chunk2', 'repo', 'original/ref') - ], []) + 'stratum1', [ + ('chunk1', 'chunk1', 'repo', 'original/ref'), + ('chunk2', 'chunk2', 'repo', 'original/ref') + ], []) stratum1 = morphlib.source.Source( - 'repo', 'original/ref', 'sha1', morph, 'stratum1.morph') + 'repo', 'original/ref', 'sha1', morph, 'stratum1.morph') pool.add(stratum1) morph = FakeStratumMorphology( - 'stratum2', [ - ('chunk2', 'chunk2', 'repo', 'original/ref'), - ('chunk1', 'chunk1', 'repo', 'original/ref') - ], ['stratum1']) + 'stratum2', [ + ('chunk2', 'chunk2', 'repo', 'original/ref'), + ('chunk1', 'chunk1', 'repo', 'original/ref') + ], ['stratum1']) stratum2 = morphlib.source.Source( - 'repo', 'original/ref', 'sha1', morph, 'stratum2.morph') + 'repo', 'original/ref', 'sha1', morph, 'stratum2.morph') pool.add(stratum2) morph = FakeChunkMorphology('chunk1') chunk1 = morphlib.source.Source( - 'repo', 'original/ref', 'sha1', morph, 'chunk1.morph') + 'repo', 'original/ref', 'sha1', morph, 'chunk1.morph') pool.add(chunk1) morph = FakeChunkMorphology('chunk2') chunk2 = morphlib.source.Source( - 'repo', 'original/ref', 'sha1', morph, 'chunk2.morph') + 'repo', 'original/ref', 'sha1', morph, 'chunk2.morph') pool.add(chunk2) self.assertRaises(morphlib.artifactresolver.MutualDependencyError, @@ -643,40 +643,40 @@ class ArtifactResolverTests(unittest.TestCase): pool = morphlib.sourcepool.SourcePool() morph = morphlib.morph2.Morphology( - ''' - { - "name": "stratum", - "kind": "stratum", - "sources": [ - { - "name": "chunk", - "repo": "repo", - "ref": "original/ref" - }, - { - "name": "chunk", - "repo": "repo", - "ref": "original/ref" - }, - { - "name": "chunk", - "repo": "repo", - "ref": "original/ref", - "build-depends": [ - "chunk" - ] - } - ] - } - ''') + ''' + { + "name": "stratum", + "kind": "stratum", + "sources": [ + { + "name": "chunk", + "repo": "repo", + "ref": "original/ref" + }, + { + "name": "chunk", + "repo": "repo", + "ref": "original/ref" + }, + { + "name": "chunk", + "repo": "repo", + "ref": "original/ref", + "build-depends": [ + "chunk" + ] + } + ] + } + ''') morph.builds_artifacts = ['stratum'] stratum = morphlib.source.Source( - 'repo', 'original/ref', 'sha1', morph, 'stratum.morph') + 'repo', 'original/ref', 'sha1', morph, 'stratum.morph') pool.add(stratum) morph = FakeChunkMorphology('chunk') chunk = morphlib.source.Source( - 'repo', 'original/ref', 'sha1', morph, 'chunk.morph') + 'repo', 'original/ref', 'sha1', morph, 'chunk.morph') pool.add(chunk) artifacts = self.resolver.resolve_artifacts(pool) @@ -697,40 +697,40 @@ class ArtifactResolverTests(unittest.TestCase): pool = morphlib.sourcepool.SourcePool() morph = morphlib.morph2.Morphology( - ''' - { - "name": "stratum", - "kind": "stratum", - "sources": [ - { - "name": "chunk1", - "repo": "repo", - "ref": "original/ref", - "build-depends": [ - "chunk2" - ] - }, - { - "name": "chunk2", - "repo": "repo", - "ref": "original/ref" - } - ] - } - ''') + ''' + { + "name": "stratum", + "kind": "stratum", + "sources": [ + { + "name": "chunk1", + "repo": "repo", + "ref": "original/ref", + "build-depends": [ + "chunk2" + ] + }, + { + "name": "chunk2", + "repo": "repo", + "ref": "original/ref" + } + ] + } + ''') morph.builds_artifacts = ['stratum'] stratum = morphlib.source.Source( - 'repo', 'original/ref', 'sha1', morph, 'stratum.morph') + 'repo', 'original/ref', 'sha1', morph, 'stratum.morph') pool.add(stratum) morph = FakeChunkMorphology('chunk1') chunk1 = morphlib.source.Source( - 'repo', 'original/ref', 'sha1', morph, 'chunk1.morph') + 'repo', 'original/ref', 'sha1', morph, 'chunk1.morph') pool.add(chunk1) morph = FakeChunkMorphology('chunk2') chunk2 = morphlib.source.Source( - 'repo', 'original/ref', 'sha1', morph, 'chunk2.morph') + 'repo', 'original/ref', 'sha1', morph, 'chunk2.morph') pool.add(chunk2) self.assertRaises(morphlib.artifactresolver.DependencyOrderError, @@ -740,28 +740,28 @@ class ArtifactResolverTests(unittest.TestCase): pool = morphlib.sourcepool.SourcePool() morph = morphlib.morph2.Morphology( - ''' - { - "name": "stratum", - "kind": "stratum", - "sources": [ - { - "name": "chunk", - "repo": "repo", - "ref": "original/ref", - "build-depends": "whatever" - } - ] - } - ''') + ''' + { + "name": "stratum", + "kind": "stratum", + "sources": [ + { + "name": "chunk", + "repo": "repo", + "ref": "original/ref", + "build-depends": "whatever" + } + ] + } + ''') morph.builds_artifacts = ['stratum'] stratum = morphlib.source.Source( - 'repo', 'original/ref', 'sha1', morph, 'stratum.morph') + 'repo', 'original/ref', 'sha1', morph, 'stratum.morph') pool.add(stratum) morph = FakeChunkMorphology('chunk') chunk = morphlib.source.Source( - 'repo', 'original/ref', 'sha1', morph, 'chunk.morph') + 'repo', 'original/ref', 'sha1', morph, 'chunk.morph') pool.add(chunk) self.assertRaises(morphlib.artifactresolver.DependencyFormatError, |