def test_get_value(self): run = MockRun() run.header_dict = {"dummy": 0, "d_score": 1} pg = peakgroup.GeneralPeakGroup([8, 9.0], run, None) pg.set_value("dummy", 42) self.assertAlmostEqual(pg.get_value("dummy"), 42) pg.set_value("dummy", None) self.assertEqual(pg.get_value("dummy"), "NA") self.assertAlmostEqual(pg.get_dscore(), 9.0)
def test_setClusterId(self): pg = peakgroup.GeneralPeakGroup([], None, None) pg.setClusterID(5) self.assertEqual(pg.get_cluster_id(), 5)
def test_create_pg(self): pg = peakgroup.GeneralPeakGroup([], None, None)