Ejemplo n.º 1
0
 def test_setTasksNotValid(self):
     mp = MacroPipeline()
     pip = Pipeline()
     with self.assertRaises(TypeError):
         mp.tasks = 0
     with self.assertRaises(TypeError):
         mp.tasks = pip
     with self.assertRaises(AssertionError):
         mp.tasks = ['load']
Ejemplo n.º 2
0
 def test_setInputNotDictionary(self):
     pip = Pipeline()
     with self.assertRaises(TypeError):
         pip.input = []
     with self.assertRaises(TypeError):
         pip.input = 'test'
Ejemplo n.º 3
0
 def test_inputDefault(self):
     pip = Pipeline()
     self.assertIsInstance(pip.input, dict)
     self.assertTrue(len(pip.input) == 0)
Ejemplo n.º 4
0
 def test_setPipelineNotValid(self):
     pip = Pipeline()
     with self.assertRaises(TypeError):
         pip.pipeline = 0
     with self.assertRaises(AssertionError):
         pip.pipeline = ['load']
Ejemplo n.º 5
0
 def test_pipelineDefault(self):
     pip = Pipeline()
     self.assertIsInstance(pip.pipeline, tuple)
     self.assertTrue(len(pip.pipeline) == 0)
Ejemplo n.º 6
0
 def setUp(self):
     self.pipeline = Pipeline()
Ejemplo n.º 7
0
 def test_setLabels(self):
     mp = MacroPipeline()
     mp.tasks = [Pipeline(), Pipeline()]
     labels = ['a', 'b']
     mp.set_labels(labels)
     self.assertListEqual(labels, [task.label for task in mp.tasks])