Beispiel #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']
Beispiel #2
0
 def test_setInputNotDictionary(self):
     pip = Pipeline()
     with self.assertRaises(TypeError):
         pip.input = []
     with self.assertRaises(TypeError):
         pip.input = 'test'
Beispiel #3
0
 def test_inputDefault(self):
     pip = Pipeline()
     self.assertIsInstance(pip.input, dict)
     self.assertTrue(len(pip.input) == 0)
Beispiel #4
0
 def test_setPipelineNotValid(self):
     pip = Pipeline()
     with self.assertRaises(TypeError):
         pip.pipeline = 0
     with self.assertRaises(AssertionError):
         pip.pipeline = ['load']
Beispiel #5
0
 def test_pipelineDefault(self):
     pip = Pipeline()
     self.assertIsInstance(pip.pipeline, tuple)
     self.assertTrue(len(pip.pipeline) == 0)
Beispiel #6
0
 def setUp(self):
     self.pipeline = Pipeline()
Beispiel #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])