#NEWLINE# def test_thread_create_xslt( self ) : #NEWLINE# #INDENT# XML = self . etree . XML #NEWLINE# tostring = self . etree . tostring #NEWLINE# root = XML ( _bytes ( '<a><b>B</b><c>C</c></a>' ) ) #NEWLINE# stylesheets = [ ] #NEWLINE# def run_thread( ) : #NEWLINE# #INDENT# style = XML ( _bytes ( '    <xsl:stylesheet\n        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"\n        version="1.0">\n      <xsl:output method="xml" />\n      <xsl:template match="/">\n         <div id="test">\n           <xsl:apply-templates/>\n         </div>\n      </xsl:template>\n    </xsl:stylesheet>' ) ) #NEWLINE# stylesheets . append ( etree . XSLT ( style ) ) #NEWLINE# #UNINDENT# self . _run_thread ( run_thread ) #NEWLINE# st = stylesheets [ 0 ] #NEWLINE# result = tostring ( st ( root ) ) #NEWLINE# self . assertEqual ( _bytes ( '<div id="test">BC</div>' ) , stylesheets )