# Path: htmlgen/structure.py
# class Section(Element):
#     """An HTML sectioning (<section>) element.
# 
#     Sections are logical units in a document, like chapter and sub-chapters.
#     """
# 
#     def __init__(self):
#         super().__init__("section")
# 
# class Article(Element):
#     """An HTML article (<article>) element.
# 
#     A self-contained article on a page, like a blog entry or a comment in a
#     blog system.
#     """
# 
#     def __init__(self):
#         super().__init__("article")
# 
# class Navigation(Element):
#     """An HTML navigation container (<nav>) element."""
# 
#     def __init__(self):
#         super().__init__("nav")
# 
# class Aside(Element):
#     """An HTML element for tangential related content (<aside>).
#     """
# 
#     def __init__(self):
#         super().__init__("aside")
# 
# class Header(Element):
#     """An HTML header (<header>) element.
# 
#     Header elements group multiple headings and related contents
#     of a section or page.
#     """
# 
#     def __init__(self):
#         super().__init__("header")
# 
# class Footer(Element):
#     """An HTML footer (<footer>) element.
# 
#     Footer elements group the footer elements of a section or page.
#     """
# 
#     def __init__(self):
#         super().__init__("footer")
# 
# class Heading(Element):
#     """A page or section heading (<h1> to <h6>) HTML element.
# 
#     Headings have a level between 1 and 6, where a lower number
#     means a more important heading. In general, the main heading
#     of a page or section uses a level 1 heading, while sub-levels
#     use a level 2 heading. Headings should be grouped with Header
#     elements.
# 
#         >>> header = Header()
#         >>> header.append(Heading(1, "Hello World!"))
#         >>> header.append(Heading(2, "The philosophical ramification of "
#         ...                          "programming in a postmodern society"))
#         >>> str(header)
#         '<header><h1>Hello World!</h1><h2>The philosophical ramification of programming in a postmodern society</h2></header>'
#     """
# 
#     def __init__(self, level=1, *content):
#         if level < 1 or level > 6:
#             raise TypeError("heading level must be between 1 and 6")
#         super().__init__("h" + str(level))
#         self.level = level
#         self.extend(content)


from unittest import TestCase
from asserts import assert_equal
from htmlgen import (
    Section,
    Article,
    Navigation,
    Aside,
    Header,
    Footer,
    Heading,
)
        assert_equal([b"<aside>", b"</aside>"], list(iter(section)))


class HeaderTest(TestCase):
    def test_element(self):
        section = Header()
        assert_equal([b"<header>", b"</header>"], list(iter(section)))


class FooterTest(TestCase):
    def test_element(self):
        section = Footer()
        assert_equal([b"<footer>", b"</footer>"], list(iter(section)))


class HeadingTest(TestCase):
    def test_without_initial_content(self):
        highlight = Heading(3)
        highlight.append("Test")
        assert_equal([b"<h3>", b"Test", b"</h3>"], list(iter(highlight)))

    def test_with_initial_content(self):
        highlight = Heading(2, "Initial", "test")
        highlight.append("content")
        assert_equal(
            [b"<h2>", b"Initial", b"test", b"content", b"</h2>"],
            list(iter(highlight)),
        )

    def test_default_depth(self):

# Path: htmlgen/structure.py
# class Section(Element):
#     """An HTML sectioning (<section>) element.
# 
#     Sections are logical units in a document, like chapter and sub-chapters.
#     """
# 
#     def __init__(self):
#         super().__init__("section")
# 
# class Article(Element):
#     """An HTML article (<article>) element.
# 
#     A self-contained article on a page, like a blog entry or a comment in a
#     blog system.
#     """
# 
#     def __init__(self):
#         super().__init__("article")
# 
# class Navigation(Element):
#     """An HTML navigation container (<nav>) element."""
# 
#     def __init__(self):
#         super().__init__("nav")
# 
# class Aside(Element):
#     """An HTML element for tangential related content (<aside>).
#     """
# 
#     def __init__(self):
#         super().__init__("aside")
# 
# class Header(Element):
#     """An HTML header (<header>) element.
# 
#     Header elements group multiple headings and related contents
#     of a section or page.
#     """
# 
#     def __init__(self):
#         super().__init__("header")
# 
# class Footer(Element):
#     """An HTML footer (<footer>) element.
# 
#     Footer elements group the footer elements of a section or page.
#     """
# 
#     def __init__(self):
#         super().__init__("footer")
# 
# class Heading(Element):
#     """A page or section heading (<h1> to <h6>) HTML element.
# 
#     Headings have a level between 1 and 6, where a lower number
#     means a more important heading. In general, the main heading
#     of a page or section uses a level 1 heading, while sub-levels
#     use a level 2 heading. Headings should be grouped with Header
#     elements.
# 
#         >>> header = Header()
#         >>> header.append(Heading(1, "Hello World!"))
#         >>> header.append(Heading(2, "The philosophical ramification of "
#         ...                          "programming in a postmodern society"))
#         >>> str(header)
#         '<header><h1>Hello World!</h1><h2>The philosophical ramification of programming in a postmodern society</h2></header>'
#     """
# 
#     def __init__(self, level=1, *content):
#         if level < 1 or level > 6:
#             raise TypeError("heading level must be between 1 and 6")
#         super().__init__("h" + str(level))
#         self.level = level
#         self.extend(content)


# Path: test_htmlgen/structure.py
from unittest import TestCase
from asserts import assert_equal
from htmlgen import (
    Section,
    Article,
    Navigation,
    Aside,
    Header,
    Footer,
    Heading,
)

        assert_equal([b"<aside>", b"</aside>"], list(iter(section)))


class HeaderTest(TestCase):
    def test_element(self):
        section = Header()
        assert_equal([b"<header>", b"</header>"], list(iter(section)))


class FooterTest(TestCase):
    def test_element(self):
        section = Footer()
        assert_equal([b"<footer>", b"</footer>"], list(iter(section)))


class HeadingTest(TestCase):
    def test_without_initial_content(self):
        highlight = Heading(3)
        highlight.append("Test")
        assert_equal([b"<h3>", b"Test", b"</h3>"], list(iter(highlight)))

    def test_with_initial_content(self):
        highlight = Heading(2, "Initial", "test")
        highlight.append("content")
        assert_equal(
            [b"<h2>", b"Initial", b"test", b"content", b"</h2>"],
            list(iter(highlight)),
        )

    def test_default_depth(self):

        highlight = Heading()