def test_append(self): pipeline = Pipeline() self.assertEqual(0, len(pipeline)) pipeline.append('enrich_protein_and_rna_origins') self.assertEqual(1, len(pipeline))
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)
def test_fail_add(self): pipeline = Pipeline() with self.assertRaises(MissingPipelineFunctionError): pipeline.append('missing function')
def test_append(self): pipeline = Pipeline() self.assertEqual(0, len(pipeline)) pipeline.append('infer_central_dogma') self.assertEqual(1, len(pipeline))