<s> from __future__ import with_statement <EOL> from . . excel_comparsion_test import ExcelComparisonTest <EOL> from datetime import date <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 . 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 . write_string ( <NUM_LIT:0> , <NUM_LIT:0> , '<STR_LIT>' ) <EOL> worksheet . write_number ( <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT> ) <EOL> workbook . close ( ) <EOL> self . assertExcelEqual ( ) <EOL> def test_create_file_A1 ( self ) : <EOL> """<STR_LIT>""" <EOL> workbook = Workbook ( self . got_filename ) <EOL> worksheet = workbook . add_worksheet ( ) <EOL> worksheet . write_string ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> worksheet . write_number ( '<STR_LIT>' , <NUM_LIT> ) <EOL> workbook . close ( ) <EOL> self . assertExcelEqual ( ) <EOL> def test_create_file_write ( self ) : <EOL> """<STR_LIT>""" <EOL> workbook = Workbook ( self . got_filename ) <EOL> worksheet = workbook . add_worksheet ( ) <EOL> worksheet . write ( <NUM_LIT:0> , <NUM_LIT:0> , '<STR_LIT>' ) <EOL> worksheet . write ( <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT> ) <EOL> workbook . close ( ) <EOL> self . assertExcelEqual ( ) <EOL> def test_create_file_with_statement ( self ) : <EOL> """<STR_LIT>""" <EOL> with Workbook ( self . got_filename ) as workbook : <EOL> worksheet = workbook . add_worksheet ( ) <EOL> worksheet . write ( <NUM_LIT:0> , <NUM_LIT:0> , '<STR_LIT>' ) <EOL> worksheet . write ( <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT> ) <EOL> self . assertExcelEqual ( ) <EOL> def test_create_file_write_A1 ( self ) : <EOL> """<STR_LIT>""" <EOL> workbook = Workbook ( self . got_filename ) <EOL> worksheet = workbook . add_worksheet ( ) <EOL> worksheet . write ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> worksheet . write ( '<STR_LIT>' , <NUM_LIT> ) <EOL> workbook . close ( ) <EOL> self . assertExcelEqual ( ) <EOL> def test_create_file_kwargs ( self ) : <EOL> """<STR_LIT>""" <EOL> workbook = Workbook ( self . got_filename ) <EOL> worksheet = workbook . add_worksheet ( ) <EOL> worksheet . write_string ( row = <NUM_LIT:0> , col = <NUM_LIT:0> , string = '<STR_LIT>' ) <EOL> worksheet . write_number ( row = <NUM_LIT:1> , col = <NUM_LIT:0> , number = <NUM_LIT> ) <EOL> workbook . close ( ) <EOL> self . assertExcelEqual ( ) <EOL> def test_create_file_write_date_default ( self ) : <EOL> """<STR_LIT>""" <EOL> workbook = Workbook ( self . got_filename ) <EOL> worksheet = workbook . add_worksheet ( ) <EOL> worksheet . write ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> worksheet . write ( '<STR_LIT>' , date ( <NUM_LIT> , <NUM_LIT:5> , <NUM_LIT:2> ) ) <EOL> workbook . close ( ) <EOL> self . assertExcelEqual ( ) <EOL> def test_create_file_in_memory ( self ) : <EOL> """<STR_LIT>""" <EOL> workbook = Workbook ( self . got_filename , { '<STR_LIT>' : True } ) <EOL> worksheet = workbook . add_worksheet ( ) <EOL> worksheet . write_string ( <NUM_LIT:0> , <NUM_LIT:0> , '<STR_LIT>' ) <EOL> worksheet . write_number ( <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT> ) <EOL> workbook . close ( ) <EOL> self . assertExcelEqual ( ) </s>
