def setUp(self):
     self.ch = categoryHinter( os.path.join('config', 'test-categories.conf') )
     self.pe = penaltyEngine
     self.obj = incomeStatement( self.ch, self.pe )
     self.io = StringIO()
     self.io.write(type2string)
     self.io.seek(0)
Beispiel #2
0
def analyze( text=None):
    if not text:
        text = open('RDATA.txt').read().decode('utf8')
    incomer = incomeStatement( ch, pe )
    incomer.read( text )
    incomer.analyze()
    data = []
    for section in ch.ordered_sections():
        data.append( [] )
        for number in incomer:
            #print number.info['nontotal']
            #print 'TOTAL: %s, state: %s' % (spec.TOTAL, number.state())
            if number.info['nontotal'] == section and not number.state():
                data[-1].append(number)
    line = [','.join( [y.str for y in  x] ) for x in data]
    print line
Beispiel #3
0
 def setUp(self):
     self.ch = categoryHinter( os.path.join('config', 'test-jcategories.conf') )
     self.pe = penaltyEngine
     self.obj = incomeStatement( self.ch, self.pe )