Example #1
0
    def test_append(self):
        pipeline = Pipeline()
        self.assertEqual(0, len(pipeline))

        pipeline.append('enrich_protein_and_rna_origins')
        self.assertEqual(1, len(pipeline))
Example #2
0
 def test_append_invalid(self):
     """Test when an invalid type is given to a :class:`pybel.struct.Pipeline`."""
     p = Pipeline()
     with self.assertRaises(TypeError):
         p.append(4)
Example #3
0
 def test_fail_add(self):
     pipeline = Pipeline()
     with self.assertRaises(MissingPipelineFunctionError):
         pipeline.append('missing function')
Example #4
0
    def test_append(self):
        pipeline = Pipeline()
        self.assertEqual(0, len(pipeline))

        pipeline.append('infer_central_dogma')
        self.assertEqual(1, len(pipeline))