'test the html_error_template'

def test_html_error_template(self):

    code = '\n%    i    =    0\n'
    try:
        template = Template(code)
        template.render_unicode()
        assert False
    except exceptions.CompileException:
        html_error = exceptions.html_error_template().render_unicode()
        assert ('CompileException:    Fragment    &#39;i    =    0&#39;    is    not    a    partial    control    statement    at    line:    2    char:    1' in html_error)
        assert ('<style>' in html_error)
        html_error_stripped = html_error.strip()
        assert html_error_stripped.startswith('<html>')
        assert html_error_stripped.endswith('</html>')
        not_full = exceptions.html_error_template().render_unicode(full=False)
        assert ('<html>' not in not_full)
        assert ('<style>' in not_full)
        no_css = exceptions.html_error_template().render_unicode(css=False)
        assert ('<style>' not in no_css)
    else:
        assert False, "This    function    should    trigger    a    CompileException,    but    didn't"
