<s> import unittest <EOL> from ... compatibility import StringIO <EOL> from . . helperfunctions import _xml_to_list <EOL> from ... worksheet import Worksheet <EOL> from ... sharedstrings import SharedStringTable <EOL> class TestAssembleWorksheet ( unittest . TestCase ) : <EOL> """<STR_LIT>""" <EOL> def test_assemble_xml_file ( self ) : <EOL> """<STR_LIT>""" <EOL> self . maxDiff = None <EOL> fh = StringIO ( ) <EOL> worksheet = Worksheet ( ) <EOL> worksheet . _set_filehandle ( fh ) <EOL> worksheet . str_table = SharedStringTable ( ) <EOL> worksheet . select ( ) <EOL> max_row = <NUM_LIT> <EOL> max_col = <NUM_LIT> <EOL> bound_error = - <NUM_LIT:1> <EOL> got = worksheet . write_string ( max_row , <NUM_LIT:0> , '<STR_LIT>' ) <EOL> self . assertEqual ( got , bound_error ) <EOL> got = worksheet . write_string ( <NUM_LIT:0> , max_col , '<STR_LIT>' ) <EOL> self . assertEqual ( got , bound_error ) <EOL> got = worksheet . write_string ( max_row , max_col , '<STR_LIT>' ) <EOL> self . assertEqual ( got , bound_error ) <EOL> got = worksheet . write_number ( max_row , <NUM_LIT:0> , <NUM_LIT> ) <EOL> self . assertEqual ( got , bound_error ) <EOL> got = worksheet . write_number ( <NUM_LIT:0> , max_col , <NUM_LIT> ) <EOL> self . assertEqual ( got , bound_error ) <EOL> got = worksheet . write_number ( max_row , max_col , <NUM_LIT> ) <EOL> self . assertEqual ( got , bound_error ) <EOL> got = worksheet . write_blank ( max_row , <NUM_LIT:0> , None , '<STR_LIT>' ) <EOL> self . assertEqual ( got , bound_error ) <EOL> got = worksheet . write_blank ( <NUM_LIT:0> , max_col , None , '<STR_LIT>' ) <EOL> self . assertEqual ( got , bound_error ) <EOL> got = worksheet . write_blank ( max_row , max_col , None , '<STR_LIT>' ) <EOL> self . assertEqual ( got , bound_error ) <EOL> got = worksheet . write_formula ( max_row , <NUM_LIT:0> , '<STR_LIT>' ) <EOL> self . assertEqual ( got , bound_error ) <EOL> got = worksheet . write_formula ( <NUM_LIT:0> , max_col , '<STR_LIT>' ) <EOL> self . assertEqual ( got , bound_error ) <EOL> got = worksheet . write_formula ( max_row , max_col , '<STR_LIT>' ) <EOL> self . assertEqual ( got , bound_error ) <EOL> got = worksheet . write_array_formula ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , max_col , '<STR_LIT>' ) <EOL> self . assertEqual ( got , bound_error ) <EOL> got = worksheet . write_array_formula ( <NUM_LIT:0> , <NUM_LIT:0> , max_row , <NUM_LIT:0> , '<STR_LIT>' ) <EOL> self . assertEqual ( got , bound_error ) <EOL> got = worksheet . write_array_formula ( <NUM_LIT:0> , max_col , <NUM_LIT:0> , <NUM_LIT:0> , '<STR_LIT>' ) <EOL> self . assertEqual ( got , bound_error ) <EOL> got = worksheet . write_array_formula ( max_row , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , '<STR_LIT>' ) <EOL> self . assertEqual ( got , bound_error ) <EOL> got = worksheet . write_array_formula ( max_row , max_col , max_row , max_col , '<STR_LIT>' ) <EOL> self . assertEqual ( got , bound_error ) <EOL> got = worksheet . set_column ( <NUM_LIT:6> , max_col , <NUM_LIT> ) <EOL> self . assertEqual ( got , bound_error ) <EOL> got = worksheet . set_column ( max_col , <NUM_LIT:6> , <NUM_LIT> ) <EOL> self . assertEqual ( got , bound_error ) <EOL> worksheet . set_row ( max_row , <NUM_LIT:30> ) <EOL> worksheet . set_column ( <NUM_LIT:0> , <NUM_LIT:3> , <NUM_LIT> ) <EOL> worksheet . write_string ( <NUM_LIT:0> , <NUM_LIT:0> , '<STR_LIT>' ) <EOL> worksheet . write_string ( <NUM_LIT:2> , <NUM_LIT:0> , '<STR_LIT>' ) <EOL> worksheet . write_string ( <NUM_LIT:2> , <NUM_LIT:3> , '<STR_LIT>' ) <EOL> worksheet . _assemble_xml_file ( ) <EOL> exp = _xml_to_list ( """<STR_LIT>""" ) <EOL> got = _xml_to_list ( fh . getvalue ( ) ) <EOL> self . assertEqual ( got , exp ) </s>
