#NEWLINE# def test_assemble_xml_file( self ) : #NEWLINE# #INDENT# 'Test for border styles.' #NEWLINE# self . maxDiff = None #NEWLINE# fh = StringIO ( ) #NEWLINE# style = Styles ( ) #NEWLINE# style . _set_filehandle ( fh ) #NEWLINE# workbook = Workbook ( ) #NEWLINE# workbook . fileclosed = 1 #NEWLINE# workbook . add_format ( { #NEWLINE# #INDENT# 'top' : 7 , #NEWLINE# #UNINDENT# } ) #NEWLINE# workbook . add_format ( { #NEWLINE# #INDENT# 'top' : 4 , #NEWLINE# #UNINDENT# } ) #NEWLINE# workbook . add_format ( { #NEWLINE# #INDENT# 'top' : 11 , #NEWLINE# #UNINDENT# } ) #NEWLINE# workbook . add_format ( { #NEWLINE# #INDENT# 'top' : 9 , #NEWLINE# #UNINDENT# } ) #NEWLINE# workbook . add_format ( { #NEWLINE# #INDENT# 'top' : 3 , #NEWLINE# #UNINDENT# } ) #NEWLINE# workbook . add_format ( { #NEWLINE# #INDENT# 'top' : 1 , #NEWLINE# #UNINDENT# } ) #NEWLINE# workbook . add_format ( { #NEWLINE# #INDENT# 'top' : 12 , #NEWLINE# #UNINDENT# } ) #NEWLINE# workbook . add_format ( { #NEWLINE# #INDENT# 'top' : 13 , #NEWLINE# #UNINDENT# } ) #NEWLINE# workbook . add_format ( { #NEWLINE# #INDENT# 'top' : 10 , #NEWLINE# #UNINDENT# } ) #NEWLINE# workbook . add_format ( { #NEWLINE# #INDENT# 'top' : 8 , #NEWLINE# #UNINDENT# } ) #NEWLINE# workbook . add_format ( { #NEWLINE# #INDENT# 'top' : 2 , #NEWLINE# #UNINDENT# } ) #NEWLINE# workbook . add_format ( { #NEWLINE# #INDENT# 'top' : 5 , #NEWLINE# #UNINDENT# } ) #NEWLINE# workbook . add_format ( { #NEWLINE# #INDENT# 'top' : 6 , #NEWLINE# #UNINDENT# } ) #NEWLINE# workbook . _set_default_xf_indices ( ) #NEWLINE# workbook . _prepare_format_properties ( ) #NEWLINE# style . _set_style_properties ( [ workbook . xf_formats , workbook . palette , workbook . font_count , workbook . num_format_count , workbook . border_count , workbook . fill_count , style . custom_colors , workbook . dxf_formats ] ) #NEWLINE# style . _assemble_xml_file ( ) #NEWLINE# exp = _xml_to_list ( '\n                <?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n                <styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">\n                  <fonts count="1">\n                    <font>\n                      <sz val="11"/>\n                      <color theme="1"/>\n                      <name val="Calibri"/>\n                      <family val="2"/>\n                      <scheme val="minor"/>\n                    </font>\n                  </fonts>\n                  <fills count="2">\n                    <fill>\n                      <patternFill patternType="none"/>\n                    </fill>\n                    <fill>\n                      <patternFill patternType="gray125"/>\n                    </fill>\n                  </fills>\n                  <borders count="14">\n                    <border>\n                      <left/>\n                      <right/>\n                      <top/>\n                      <bottom/>\n                      <diagonal/>\n                    </border>\n                    <border>\n                      <left/>\n                      <right/>\n                      <top style="hair">\n                        <color auto="1"/>\n                      </top>\n                      <bottom/>\n                      <diagonal/>\n                    </border>\n                    <border>\n                      <left/>\n                      <right/>\n                      <top style="dotted">\n                        <color auto="1"/>\n                      </top>\n                      <bottom/>\n                      <diagonal/>\n                    </border>\n                    <border>\n                      <left/>\n                      <right/>\n                      <top style="dashDotDot">\n                        <color auto="1"/>\n                      </top>\n                      <bottom/>\n                      <diagonal/>\n                    </border>\n                    <border>\n                      <left/>\n                      <right/>\n                      <top style="dashDot">\n                        <color auto="1"/>\n                      </top>\n                      <bottom/>\n                      <diagonal/>\n                    </border>\n                    <border>\n                      <left/>\n                      <right/>\n                      <top style="dashed">\n                        <color auto="1"/>\n                      </top>\n                      <bottom/>\n                      <diagonal/>\n                    </border>\n                    <border>\n                      <left/>\n                      <right/>\n                      <top style="thin">\n                        <color auto="1"/>\n                      </top>\n                      <bottom/>\n                      <diagonal/>\n                    </border>\n                    <border>\n                      <left/>\n                      <right/>\n                      <top style="mediumDashDotDot">\n                        <color auto="1"/>\n                      </top>\n                      <bottom/>\n                      <diagonal/>\n                    </border>\n                    <border>\n                      <left/>\n                      <right/>\n                      <top style="slantDashDot">\n                        <color auto="1"/>\n                      </top>\n                      <bottom/>\n                      <diagonal/>\n                    </border>\n                    <border>\n                      <left/>\n                      <right/>\n                      <top style="mediumDashDot">\n                        <color auto="1"/>\n                      </top>\n                      <bottom/>\n                      <diagonal/>\n                    </border>\n                    <border>\n                      <left/>\n                      <right/>\n                      <top style="mediumDashed">\n                        <color auto="1"/>\n                      </top>\n                      <bottom/>\n                      <diagonal/>\n                    </border>\n                    <border>\n                      <left/>\n                      <right/>\n                      <top style="medium">\n                        <color auto="1"/>\n                      </top>\n                      <bottom/>\n                      <diagonal/>\n                    </border>\n                    <border>\n                      <left/>\n                      <right/>\n                      <top style="thick">\n                        <color auto="1"/>\n                      </top>\n                      <bottom/>\n                      <diagonal/>\n                    </border>\n                    <border>\n                      <left/>\n                      <right/>\n                      <top style="double">\n                        <color auto="1"/>\n                      </top>\n                      <bottom/>\n                      <diagonal/>\n                    </border>\n                  </borders>\n                  <cellStyleXfs count="1">\n                    <xf numFmtId="0" fontId="0" fillId="0" borderId="0"/>\n                  </cellStyleXfs>\n                  <cellXfs count="14">\n                    <xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/>\n                    <xf numFmtId="0" fontId="0" fillId="0" borderId="1" xfId="0" applyBorder="1"/>\n                    <xf numFmtId="0" fontId="0" fillId="0" borderId="2" xfId="0" applyBorder="1"/>\n                    <xf numFmtId="0" fontId="0" fillId="0" borderId="3" xfId="0" applyBorder="1"/>\n                    <xf numFmtId="0" fontId="0" fillId="0" borderId="4" xfId="0" applyBorder="1"/>\n                    <xf numFmtId="0" fontId="0" fillId="0" borderId="5" xfId="0" applyBorder="1"/>\n                    <xf numFmtId="0" fontId="0" fillId="0" borderId="6" xfId="0" applyBorder="1"/>\n                    <xf numFmtId="0" fontId="0" fillId="0" borderId="7" xfId="0" applyBorder="1"/>\n                    <xf numFmtId="0" fontId="0" fillId="0" borderId="8" xfId="0" applyBorder="1"/>\n                    <xf numFmtId="0" fontId="0" fillId="0" borderId="9" xfId="0" applyBorder="1"/>\n                    <xf numFmtId="0" fontId="0" fillId="0" borderId="10" xfId="0" applyBorder="1"/>\n                    <xf numFmtId="0" fontId="0" fillId="0" borderId="11" xfId="0" applyBorder="1"/>\n                    <xf numFmtId="0" fontId="0" fillId="0" borderId="12" xfId="0" applyBorder="1"/>\n                    <xf numFmtId="0" fontId="0" fillId="0" borderId="13" xfId="0" applyBorder="1"/>\n                  </cellXfs>\n                  <cellStyles count="1">\n                    <cellStyle name="Normal" xfId="0" builtinId="0"/>\n                  </cellStyles>\n                  <dxfs count="0"/>\n                  <tableStyles count="0" defaultTableStyle="TableStyleMedium9" defaultPivotStyle="PivotStyleLight16"/>\n                </styleSheet>\n                ' ) #NEWLINE# got = _xml_to_list ( fh . getvalue ( ) ) #NEWLINE# self . assertEqual ( got , exp )