<commit_before># coding: utf8
"""Tests of HTML reporting for django_coverage_plugin."""

import os

from .plugin_test import DjangoPluginTestCase


class HtmlTest(DjangoPluginTestCase):

    def test_simple(self):
        self.make_template("""\
            Simple © 2015
            """)

        self.run_django_coverage()
        self.cov.html_report()
        print(os.getcwd())
        print(os.listdir("htmlcov"))
        with open("htmlcov/templates_test_simple_html.html") as fhtml:
            html = fhtml.read()
        self.assertIn("<span class='txt'>Simple &#169; 2015</span>", html)
<commit_msg>Coverage 4.0a6 changed the quotes in the HTML.<commit_after># coding: utf8
"""Tests of HTML reporting for django_coverage_plugin."""

import os

from .plugin_test import DjangoPluginTestCase


class HtmlTest(DjangoPluginTestCase):

    def test_simple(self):
        self.make_template("""\
            Simple © 2015
            """)

        self.run_django_coverage()
        self.cov.html_report()
        with open("htmlcov/templates_test_simple_html.html") as fhtml:
            html = fhtml.read()
        self.assertIn('<span class="txt">Simple &#169; 2015</span>', html)

{'fraction_non_alphanumeric': 0.12111017661900757, 'fraction_numerical': 0.022708158116063918, 'mean_word_length': 2.9403973509933774, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6916102', 'n_tokens_mistral': 379, 'n_tokens_neox': 349, 'n_words': 81}