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()))
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)
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)
def testBeforeExecute(self): """Test that _beforeExecute is being called.""" l = TestLayer("test2") self.assertFalse(l.beforeExecuteSet) l.beforeExecute() self.assertTrue(l.beforeExecuteSet)
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)
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)
def testSetup(self): """Test that _setup is being called.""" l = TestLayer("test2") self.assertFalse(l.setupSet) l.setup() self.assertTrue(l.setupSet)
def testGetLocalFrameSetSingle(self): """Test getting the local frameset.""" l = TestLayer("test2") frameset = l.getLocalFrameSet(1) print frameset
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)
def testExecute(self): """Test that _execute is being called.""" l = TestLayer("test2") self.assertFalse(l.executeSet) l.execute(1) self.assertTrue(l.executeSet)
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)
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)
def testAfterExecute(self): """Test that _afterExecute is being called.""" l = TestLayer("test2") self.assertFalse(l.afterExecuteSet) l.afterExecute() self.assertTrue(l.afterExecuteSet)
def testAfterInit(self): """Test that after_init is being run by the metaclass.""" l = TestLayer("test2") self.assertTrue(l.afterInitSet)
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)