<s> from . . excel_comparsion_test import ExcelComparisonTest <EOL> from ... workbook import Workbook <EOL> class TestCompareXLSXFiles ( ExcelComparisonTest ) : <EOL> """<STR_LIT>""" <EOL> def setUp ( self ) : <EOL> self . maxDiff = None <EOL> filename = '<STR_LIT>' <EOL> test_dir = '<STR_LIT>' <EOL> self . got_filename = test_dir + '<STR_LIT>' + filename <EOL> self . exp_filename = test_dir + '<STR_LIT>' + filename <EOL> self . txt_filename = test_dir + '<STR_LIT>' + '<STR_LIT>' <EOL> self . ignore_files = [ ] <EOL> self . ignore_elements = { } <EOL> def test_create_file ( self ) : <EOL> """<STR_LIT>""" <EOL> workbook = Workbook ( self . got_filename ) <EOL> worksheet = workbook . add_worksheet ( ) <EOL> worksheet . autofilter ( '<STR_LIT>' ) <EOL> worksheet . filter_column ( '<STR_LIT:A>' , '<STR_LIT>' ) <EOL> worksheet . filter_column ( '<STR_LIT:C>' , '<STR_LIT>' ) <EOL> textfile = open ( self . txt_filename ) <EOL> headers = textfile . readline ( ) . strip ( "<STR_LIT:\n>" ) . split ( ) <EOL> worksheet . write_row ( '<STR_LIT>' , headers ) <EOL> row = <NUM_LIT:1> <EOL> for line in textfile : <EOL> data = line . strip ( "<STR_LIT:\n>" ) . split ( ) <EOL> for i , item in enumerate ( data ) : <EOL> try : <EOL> data [ i ] = float ( item ) <EOL> except ValueError : <EOL> pass <EOL> region = data [ <NUM_LIT:0> ] <EOL> volume = int ( data [ <NUM_LIT:2> ] ) <EOL> if region == '<STR_LIT>' and volume > <NUM_LIT> and volume < <NUM_LIT> : <EOL> pass <EOL> else : <EOL> worksheet . set_row ( row , options = { '<STR_LIT>' : True } ) <EOL> worksheet . write_row ( row , <NUM_LIT:0> , data ) <EOL> row += <NUM_LIT:1> <EOL> textfile . close ( ) <EOL> workbook . close ( ) <EOL> self . assertExcelEqual ( ) </s>
