#NEWLINE# def testMalformedHeader( self ) : #NEWLINE# #INDENT# str = ( ( 'test 2011/02/05 * Bookshop\n' + '    Assets:Bank          -40 EUR\n' ) + '    Expenses:Book' ) #NEWLINE# with self . assertRaises ( MalformedHeader ) as cm : #NEWLINE# #INDENT# self . parser . parse_transaction ( self )