def test_ave_unw(self): c = Average('TestAve') c.add(1, 1) c.add(2, 1) ave, unc = c.average() self.assertEqual(ave, 1.5)
def test_ave_wei(self): c = Average('TestAve') c.add(0, 1) c.add(1, 3) ave, unc = c.average() self.assertEqual(ave, 0.75)