Ejemplo n.º 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()))
Ejemplo n.º 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()))
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 5
0
 def testBeforeExecute(self):
     """Test that _beforeExecute is being called."""
     l = TestLayer("test2")
     self.assertFalse(l.beforeExecuteSet)
     l.beforeExecute()
     self.assertTrue(l.beforeExecuteSet)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 9
0
 def testSetup(self):
     """Test that _setup is being called."""
     l = TestLayer("test2")
     self.assertFalse(l.setupSet)
     l.setup()
     self.assertTrue(l.setupSet)
Ejemplo n.º 10
0
 def testBeforeExecute(self):
     """Test that _beforeExecute is being called."""
     l = TestLayer("test2")
     self.assertFalse(l.beforeExecuteSet)
     l.beforeExecute()
     self.assertTrue(l.beforeExecuteSet)
Ejemplo n.º 11
0
 def testGetLocalFrameSetSingle(self):
     """Test getting the local frameset."""
     l = TestLayer("test2")
     frameset = l.getLocalFrameSet(1)
     print frameset
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 16
0
 def testGetLocalFrameSetSingle(self):
     """Test getting the local frameset."""
     l = TestLayer("test2")
     frameset = l.getLocalFrameSet(1)
     print frameset
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 19
0
 def testAfterExecute(self):
     """Test that _afterExecute is being called."""
     l = TestLayer("test2")
     self.assertFalse(l.afterExecuteSet)
     l.afterExecute()
     self.assertTrue(l.afterExecuteSet)
Ejemplo n.º 20
0
 def testAfterInit(self):
     """Test that after_init is being run by the metaclass."""
     l = TestLayer("test2")
     self.assertTrue(l.afterInitSet)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 24
0
 def testAfterExecute(self):
     """Test that _afterExecute is being called."""
     l = TestLayer("test2")
     self.assertFalse(l.afterExecuteSet)
     l.afterExecute()
     self.assertTrue(l.afterExecuteSet)
Ejemplo n.º 25
0
 def testSetup(self):
     """Test that _setup is being called."""
     l = TestLayer("test2")
     self.assertFalse(l.setupSet)
     l.setup()
     self.assertTrue(l.setupSet)