#NEWLINE# def _report( self ) : #NEWLINE# #INDENT# if self . diff_column_count : #NEWLINE# #INDENT# self . _writeln ( ' Tables have different number of columns:' ) #NEWLINE# self . _writeln ( ( '  a: %d' % self . diff_column_count [ 0 ] ) ) #NEWLINE# self . _writeln ( ( '  b: %d' % self . diff_column_count [ 1 ] ) ) #NEWLINE# #UNINDENT# if self . diff_column_names : #NEWLINE# #INDENT# for name in self . diff_column_names [ 0 ] : #NEWLINE# #INDENT# format = self . diff_columns [ 0 ] [ name . lower ( ) ] . format #NEWLINE# self . _writeln ( ( ' Extra column %s of format %s in a' % ( name , format ) ) ) #NEWLINE# #UNINDENT# for name in self . diff_column_names [ 1 ] : #NEWLINE# #INDENT# format = self . diff_columns [ 1 ] [ name . lower ( ) ] . format #NEWLINE# self . _writeln ( ( ' Extra column %s of format %s in b' % ( name , format ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# col_attrs = dict ( _COL_ATTRS ) #NEWLINE# for ( col_attr , vals ) in self . diff_column_attributes : #NEWLINE# #INDENT# ( name , attr ) = col_attr #NEWLINE# self . _writeln ( ( ' Column %s has different %s:' % ( name , col_attrs [ attr ] ) ) ) #NEWLINE# report_diff_values ( self . _fileobj , vals [ 0 ] , vals [ 1 ] , ind = ( self . _indent + 1 ) ) #NEWLINE# #UNINDENT# if self . diff_rows : #NEWLINE# #INDENT# self . _writeln ( ' Table rows differ:' ) #NEWLINE# self . _writeln ( ( '  a: %s' % self . diff_rows [ 0 ] ) ) #NEWLINE# self . _writeln ( ( '  b: %s' % self . diff_rows [ 1 ] ) ) #NEWLINE# self . _writeln ( ' No further data comparison performed.' ) #NEWLINE# return #NEWLINE# #UNINDENT# if ( not self . diff_values ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# for ( indx , values ) in self . diff_values : #NEWLINE# #INDENT# self . _writeln ( ( ' Column %s data differs in row %d:' % indx ) ) #NEWLINE# report_diff_values ( self . _fileobj , values [ 0 ] , values [ 1 ] , ind = ( self . _indent + 1 ) ) #NEWLINE# #UNINDENT# if ( self . diff_values and ( self . numdiffs < self . diff_total ) ) : #NEWLINE# #INDENT# self . _writeln ( ( ' ...%d additional difference(s) found.' % ( self . diff_total - self . numdiffs ) ) ) #NEWLINE# #UNINDENT# if ( self . diff_total > self . numdiffs ) : #NEWLINE# #INDENT# self . _writeln ( ' ...' ) #NEWLINE# #UNINDENT# self . _writeln ( ( ' %d different table data element(s) found (%.2f%% different).' % ( self . diff_total , ( self . diff_ratio * 100 ) ) ) )