CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions
average_test.AverageTestCase Class Reference
Inheritance diagram for average_test.AverageTestCase:

Public Member Functions

def test_ave_add
 
def test_ave_unw
 
def test_ave_wei
 

Detailed Description

Definition at line 6 of file average_test.py.

Member Function Documentation

def average_test.AverageTestCase.test_ave_add (   self)

Definition at line 22 of file average_test.py.

References Average.

22 
23  def test_ave_add(self):
24  c1 = Average('c1')
25  c1.add(0,1)
26  c2 = Average('c2')
27  c2.add(1,3)
28  c3 = c1 + c2
29  ave, unc = c3.average()
30  self.assertEqual(ave, 0.75)
def average_test.AverageTestCase.test_ave_unw (   self)

Definition at line 8 of file average_test.py.

References Average.

8 
9  def test_ave_unw(self):
10  c = Average('TestAve')
11  c.add( 1, 1 )
12  c.add( 2, 1 )
13  ave, unc = c.average()
14  self.assertEqual(ave, 1.5)
def average_test.AverageTestCase.test_ave_wei (   self)

Definition at line 15 of file average_test.py.

References Average.

15 
16  def test_ave_wei(self):
17  c = Average('TestAve')
18  c.add( 0, 1 )
19  c.add( 1, 3 )
20  ave, unc = c.average()
21  self.assertEqual(ave, 0.75)