Beispiel #1
0
 def testGetLocalFrameSetChunked(self):
     """Test getting the local frameset."""
     l = TestLayer("test2", chunk=10, range="1-20")
     frameset = l.getLocalFrameSet(1)
     self.assertEquals("1-10", str(frameset.normalize()))
     frameset = l.getLocalFrameSet(11)
     self.assertEquals("11-20", str(frameset.normalize()))
Beispiel #2
0
 def testGetLocalFrameSetChunked(self):
     """Test getting the local frameset."""
     l = TestLayer("test2", chunk=10, range="1-20")
     frameset = l.getLocalFrameSet(1)
     self.assertEquals("1-10", str(frameset.normalize()))
     frameset = l.getLocalFrameSet(11)
     self.assertEquals("11-20", str(frameset.normalize()))
Beispiel #3
0
 def testSetup(self):
     """Test that setup is being run by the plugin manager."""
     j = blueprint.Job("foo")
     l = TestLayer("test2")
     j.addLayer(l)
     j.setup()
     self.assertTrue(blueprint.plugins.test_plugin.Init.LayerSetup)
     self.assertTrue(blueprint.plugins.test_plugin.Init.JobSetup)
Beispiel #4
0
 def testSetup(self):
     """Test that _setup is being called."""
     # To call setup you must have a job
     l = TestLayer("test2")
     self.job.addLayer(l)
     self.assertFalse(l.setupSet)
     self.job.setup()
     self.assertTrue(l.setupSet)
Beispiel #5
0
 def testBeforeExecute(self):
     """Test that _beforeExecute is being called."""
     l = TestLayer("test2")
     self.assertFalse(l.beforeExecuteSet)
     l.beforeExecute()
     self.assertTrue(l.beforeExecuteSet)
Beispiel #6
0
 def testAfterExecute(self):
     """Test that after execute is being run by the plugin manager."""
     l = TestLayer("test2")
     l.afterExecute()
     self.assertTrue(blueprint.plugins.test_plugin.Init.AfterExecute)
Beispiel #7
0
 def testBeforeExecute(self):
     """Test that before execute is being run by the plugin manager."""
     l = TestLayer("test2")
     l.beforeExecute()
     self.assertTrue(blueprint.plugins.test_plugin.Init.BeforeExecute)
Beispiel #8
0
 def testAfterExecute(self):
     """Test that after execute is being run by the plugin manager."""
     l = TestLayer("test2")
     l.afterExecute()
     self.assertTrue(blueprint.plugins.test_plugin.Init.AfterExecute)
Beispiel #9
0
 def testSetup(self):
     """Test that _setup is being called."""
     l = TestLayer("test2")
     self.assertFalse(l.setupSet)
     l.setup()
     self.assertTrue(l.setupSet)
Beispiel #10
0
 def testBeforeExecute(self):
     """Test that _beforeExecute is being called."""
     l = TestLayer("test2")
     self.assertFalse(l.beforeExecuteSet)
     l.beforeExecute()
     self.assertTrue(l.beforeExecuteSet)
Beispiel #11
0
 def testGetLocalFrameSetSingle(self):
     """Test getting the local frameset."""
     l = TestLayer("test2")
     frameset = l.getLocalFrameSet(1)
     print frameset
Beispiel #12
0
 def testAddDependAllWithConstructor(self):
     """Test setup depend:all with constructor"""
     l1 = TestLayer("testLayerA")
     l2 = TestLayer("testLayerB", depend="testLayerA:all")
     self.assertEquals(blueprint.DependType.All, l2.getDepends()[0].type)
Beispiel #13
0
 def testExecute(self):
     """Test that _execute is being called."""
     l = TestLayer("test2")
     self.assertFalse(l.executeSet)
     l.execute(1)
     self.assertTrue(l.executeSet)
Beispiel #14
0
 def testAddDependAllWithConstructor(self):
     """Test setup depend:all with constructor"""
     l1 = TestLayer("testLayerA")
     l2 = TestLayer("testLayerB", depend="testLayerA:all")
     self.assertEquals(blueprint.DependType.All, l2.getDepends()[0].type)
Beispiel #15
0
 def testAddDependByTaskWithConstructor(self):
     """Test setup depend by task with constructor."""
     l1 = TestLayer("testLayerA")
     l2 = TestLayer("testLayerB", depend="testLayerA")
     self.assertEquals(blueprint.DependType.ByTask, l2.getDepends()[0].type)
Beispiel #16
0
 def testGetLocalFrameSetSingle(self):
     """Test getting the local frameset."""
     l = TestLayer("test2")
     frameset = l.getLocalFrameSet(1)
     print frameset
Beispiel #17
0
 def testSetup(self):
     """Test that setup is being run by the plugin manager."""
     l = TestLayer("test2")
     l.setup()
     self.assertTrue(blueprint.plugins.test_plugin.Init.Setup)
Beispiel #18
0
 def testAddDependByTaskWithConstructor(self):
     """Test setup depend by task with constructor."""
     l1 = TestLayer("testLayerA")
     l2 = TestLayer("testLayerB", depend="testLayerA")
     self.assertEquals(blueprint.DependType.ByTask, l2.getDepends()[0].type)
Beispiel #19
0
 def testAfterExecute(self):
     """Test that _afterExecute is being called."""
     l = TestLayer("test2")
     self.assertFalse(l.afterExecuteSet)
     l.afterExecute()
     self.assertTrue(l.afterExecuteSet)
Beispiel #20
0
 def testAfterInit(self):
     """Test that after_init is being run by the metaclass."""
     l = TestLayer("test2")
     self.assertTrue(l.afterInitSet)
Beispiel #21
0
 def testAfterInit(self):
     """Test that after_init is being run by the plugin manager."""
     l = TestLayer("test2")
     self.assertTrue(blueprint.plugins.test_plugin.Init.AfterInit)
Beispiel #22
0
 def testExecute(self):
     """Test that _execute is being called."""
     l = TestLayer("test2")
     self.assertFalse(l.executeSet)
     l.execute(1)
     self.assertTrue(l.executeSet)
Beispiel #23
0
 def testBeforeExecute(self):
     """Test that before execute is being run by the plugin manager."""
     l = TestLayer("test2")
     l.beforeExecute()
     self.assertTrue(blueprint.plugins.test_plugin.Init.BeforeExecute)
Beispiel #24
0
 def testAfterExecute(self):
     """Test that _afterExecute is being called."""
     l = TestLayer("test2")
     self.assertFalse(l.afterExecuteSet)
     l.afterExecute()
     self.assertTrue(l.afterExecuteSet)
Beispiel #25
0
 def testSetup(self):
     """Test that _setup is being called."""
     l = TestLayer("test2")
     self.assertFalse(l.setupSet)
     l.setup()
     self.assertTrue(l.setupSet)