Beispiel #1
0
 def testCondense(self):
     bl = [type1Line( '1 blah 2 blah 3 blah 4 blah 5', ch )]
     assumptions = assumptionsList( bl )
     spec = assumptionSpec()
     spec.mark_cruft(1)
     spec.mark_total(2)
     spec.mark_grand_total(3)
     self.assertEqual( assumptions[0].condense( spec ), [1, 3, 4] )
Beispiel #2
0
 def setUp(self):
     ch = categoryHinter( os.path.join('config', 'test-categories.conf') )
     bl = [type1Line( ' x 2007', ch )]
     bl.append( type1Line('', ch) )
     bl.append( type1Line('', ch) )
     bl.append( type1Line('', ch) )
     bl.append( type1Line('x 1. dues 10000', ch) )
     self.assumption = assumptionsList( bl )[0]
     self.assumption_spec = assumptionSpec()
     self.engine = penaltyEngine( self.assumption, self.assumption_spec )
Beispiel #3
0
 def testAssumptionLength(self):
     bl = [type1Line( '1 blah 2 blah 3', ch )]
     assumptions = assumptionsList( bl )
     spec = assumptionSpec()
     spec.mark_cruft(1)
     self.assertEqual( assumptions[0].length( spec ), 2)
Beispiel #4
0
 def setUp(self):
     self.ch = testCH()
     self.ch.read( os.path.join('config', 'test-categories.conf') )
     bl = [type1Line( 'project 100 blah 100 blah 200', self.ch )]
     self.assumptions = assumptionsList( bl, 'type1' )
     self.assumption = self.assumptions[0]