Skip to content

Commit

Permalink
OldButler parents are represented by a RepositoryCfg in the parents list
Browse files Browse the repository at this point in the history
  • Loading branch information
n8pease committed Jul 26, 2017
1 parent cd535ff commit dc016ae
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions tests/testOutputRoot.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,13 @@ def testCreateOutputRoot(self):
self.assertTrue(os.path.isdir(testOutput))
self.assertTrue(os.path.exists(os.path.join(testOutput, "repositoryCfg.yaml")))
cfg = dafPersist.PosixStorage.getRepositoryCfg(testOutput)
expectedCfg = dafPersist.RepositoryCfg(root=testPath,
mapper=MinMapper1,
mapperArgs=None,
parents=None,
policy=None)
self.assertEqual(len(cfg.parents), 1)
self.assertEqual(cfg.parents[0], testPath)
self.assertEqual(cfg.parents[0], expectedCfg)

def testParentNormal(self):
"""Test that an object can be found at root location and put into an output location.
Expand Down Expand Up @@ -158,7 +163,12 @@ def testReuseOutputRoot(self):
self.assertTrue(os.path.exists(testOutput))
self.assertTrue(os.path.isdir(testOutput))
cfg = dafPersist.Storage().getRepositoryCfg(testOutput)
self.assertEqual(cfg.parents, [testPath])
expectedCfg = dafPersist.RepositoryCfg(root=testPath,
mapper=MinMapper1,
mapperArgs=None,
parents=None,
policy=None)
self.assertEqual(cfg.parents, [expectedCfg])
del butler

butler = dafPersist.Butler(inputs={'root': testOutput, 'mapper': MinMapper1},
Expand Down

0 comments on commit dc016ae

Please sign in to comment.