<s> import unittest <EOL> from ... compatibility import StringIO <EOL> from . . helperfunctions import _xml_to_list <EOL> from ... table import Table <EOL> from ... worksheet import Worksheet <EOL> from ... workbook import WorksheetMeta <EOL> from ... sharedstrings import SharedStringTable <EOL> from ... format import Format <EOL> class TestAssembleTable ( unittest . TestCase ) : <EOL> """<STR_LIT>""" <EOL> def test_assemble_xml_file ( self ) : <EOL> """<STR_LIT>""" <EOL> self . maxDiff = None <EOL> worksheet = Worksheet ( ) <EOL> worksheet . worksheet_meta = WorksheetMeta ( ) <EOL> worksheet . str_table = SharedStringTable ( ) <EOL> dxf_format = Format ( ) <EOL> dxf_format . dxf_index = <NUM_LIT:0> <EOL> worksheet . add_table ( '<STR_LIT>' , { '<STR_LIT>' : <NUM_LIT:1> , <EOL> '<STR_LIT>' : [ { '<STR_LIT>' : '<STR_LIT>' } , <EOL> { } , <EOL> { } , <EOL> { '<STR_LIT>' : '<STR_LIT:count>' , <EOL> '<STR_LIT>' : dxf_format , <EOL> '<STR_LIT>' : '<STR_LIT>' } , <EOL> ] } ) <EOL> worksheet . _prepare_tables ( <NUM_LIT:1> , { } ) <EOL> fh = StringIO ( ) <EOL> table = Table ( ) <EOL> table . _set_filehandle ( fh ) <EOL> table . _set_properties ( worksheet . tables [ <NUM_LIT:0> ] ) <EOL> table . _assemble_xml_file ( ) <EOL> exp = _xml_to_list ( """<STR_LIT>""" ) <EOL> got = _xml_to_list ( fh . getvalue ( ) ) <EOL> self . assertEqual ( got , exp ) </s>
