#! /usr/bin/env python3
# $Id: test_html5_polyglot_parts.py 9997 2024-12-11 14:36:22Z milde $
# Author: reggie dugard
# Copyright: This module has been placed in the public domain.
"""
Test `core.publish_parts()`__ with the HTML5 writer.
__ https://docutils.sourceforge.io/docs/api/publisher.html#publish-parts
"""
from pathlib import Path
import sys
import unittest
if __name__ == '__main__':
# prepend the "docutils root" to the Python library path
# so we import the local `docutils` package.
sys.path.insert(0, str(Path(__file__).resolve().parents[2]))
import docutils
import docutils.core
from docutils.writers import html5_polyglot
# Parts returned by `publish_parts()` for the HTML5 writer by default:
# * empty input string
# * default configuration settings.
# See format_parts() below for the substitution of unresolved format markers.
default_parts = {
'body': '{fragment}',
'body_pre_docinfo': '',
'body_prefix': '\n\n{header}\n',
'body_suffix': '\n{footer}\n