#NEWLINE# def testParseError( self ) : #NEWLINE# #INDENT# with self . assertRaises ( PledgerException ) as cm : #NEWLINE# #INDENT# self . parser . parse_ledger ( fixture_path ( 'errors.dat' ) ) #NEWLINE# #UNINDENT# self . assertEqual ( 3 , cm . exception . line_number ) #NEWLINE# self . assertEqual ( fixture_path ( 'errors.dat' ) , self . exception . filename )