def assert_htmlcov_files_exist(self) -> None:
        """Assert that all the expected htmlcov files exist."""
        self.assert_exists("htmlcov/index.html")
        self.assert_exists("htmlcov/function_index.html")
        self.assert_exists("htmlcov/class_index.html")
        self.assert_exists("htmlcov/main_file_py.html")
        self.assert_exists("htmlcov/helper1_py.html")
        self.assert_exists("htmlcov/helper2_py.html")
        self.assert_exists("htmlcov/.gitignore")
        # Cache-busted files have random data in the name, but they should all
        # be there, and there should only be one of each.
        statics = ["style.css", "coverage_html.js", "keybd_closed.png", "favicon_32.png"]
        files = os.listdir("htmlcov")
        for static in statics:
            base, ext = os.path.splitext(static)
            busted_file_pattern = fr"{base}_cb_\w{{8}}{ext}"
            matches = [m for f in files if (m := re.fullmatch(busted_file_pattern, f))]
            assert len(matches) == 1, f"Found {len(matches)} files for {static}"
Assert that all the expected htmlcov files exist.
tests/test_html.py