# Path: htmlgen/inline.py
# class Span(Element):
#     """An HTML in-line <span> element.
# 
#     <span> elements are inline elements without semantic meaning. They are
#     containers for styling or scripting.
# 
#         >>> span1 = Span("Example", "text")
#         >>> span2 = Span()
#         >>> span2.append("Example text")
#     """
# 
#     def __init__(self, *content):
#         super().__init__("span")
#         self.extend(content)
# 
# class Highlight(Element):
#     """An HTML in-line highlighting (<b>) element.
# 
#     <b> elements are used to highlight words or sentences, without giving
#     more importance to them.
# 
#     Note: Despite the name, <b> elements are not necessarily displayed in a
#     bold font. Use CSS for styling purposes.
# 
#     Compare with the Strong, Alternate, and Emphasis elements.
# 
#     Example:
# 
#         >>> span = Span()
#         >>> span.append("The ")
#         >>> span.append(Highlight("swordfish"))
#         >>> span.append(" is a member of the ")
#         >>> span.append(Alternate("Xiphiidae"))
#         >>> span.append(" family.")
#     """
# 
#     def __init__(self, *content):
#         super().__init__("b")
#         self.extend(content)
# 
# class Strong(Element):
#     """An HTML in-line element for strong importance or urgency (<strong>).
# 
#     Compare with the Highlight, Alternate, and Emphasis elements.
# 
#     Example:
# 
#         >>> Strong("It is imperative to turn off the froblunator after use!"))
#     """
# 
#     def __init__(self, *content):
#         super().__init__("strong")
#         self.extend(content)
# 
# class Alternate(Element):
#     """An HTML in-line element for alternate voice text (<i>).
# 
#     This includes the introduction of a term or thoughts.
# 
#     Note: Despite the name, <i> elements are not necessarily displayed in a
#     italic font. Use CSS for styling purposes.
# 
#     Compare with the Highlight, Strong, and Emphasis elements.
# 
#     Example:
# 
#         >>> span = Span()
#         >>> span.append("This is called a ")
#         >>> span.append(Alternate("froblunator"))
#         >>> span.append(".")
#     """
# 
#     def __init__(self, *content):
#         super().__init__("i")
#         self.extend(content)
# 
# class Emphasis(Element):
#     """An HTML stress emphasis (<em>) element.
# 
#     Compare with the Highlight, Strong, and Alternate elements.
# 
#     Example:
# 
#         >>> span = Span()
#         >>> span.append(Emphasis("This"))
#         >>> span.append(" is great.")
#     """
# 
#     def __init__(self, *content):
#         super().__init__("em")
#         self.extend(content)
# 
# class Small(Element):
#     """An HTML in-line element for side comments and small print (<small>).
# 
#     Note: Text inside <small> elements is not necessarily rendered with a
#     smaller font size than surrounding text. Use CSS for styling purposes.
# 
#     Example:
# 
#         >>> Small("Copyright (C) 2010")
#     """
# 
#     def __init__(self, *content):
#         super().__init__("small")
#         self.extend(content)
# 
# class LineBreak(VoidElement):
#     """An HTML line break (<br>) element."""
# 
#     def __init__(self):
#         super().__init__("br")


from unittest import TestCase
from asserts import assert_equal
from htmlgen import (
    Span,
    Highlight,
    Strong,
    Alternate,
    Emphasis,
    Small,
    LineBreak,
)
    def test_with_initial_content(self):
        strong = Strong("Initial", "test")
        strong.append("content")
        assert_equal(
            [b"<strong>", b"Initial", b"test", b"content", b"</strong>"],
            list(iter(strong)),
        )


class AlternateTest(TestCase):
    def test_without_initial_content(self):
        alt = Alternate()
        alt.append("Test")
        assert_equal([b"<i>", b"Test", b"</i>"], list(iter(alt)))

    def test_with_initial_content(self):
        alt = Alternate("Initial", "test")
        alt.append("content")
        assert_equal(
            [b"<i>", b"Initial", b"test", b"content", b"</i>"], list(iter(alt))
        )


class EmphasisTest(TestCase):
    def test_without_initial_content(self):
        em = Emphasis()
        em.append("Test")
        assert_equal([b"<em>", b"Test", b"</em>"], list(iter(em)))

    def test_with_initial_content(self):

# Path: htmlgen/inline.py
# class Span(Element):
#     """An HTML in-line <span> element.
# 
#     <span> elements are inline elements without semantic meaning. They are
#     containers for styling or scripting.
# 
#         >>> span1 = Span("Example", "text")
#         >>> span2 = Span()
#         >>> span2.append("Example text")
#     """
# 
#     def __init__(self, *content):
#         super().__init__("span")
#         self.extend(content)
# 
# class Highlight(Element):
#     """An HTML in-line highlighting (<b>) element.
# 
#     <b> elements are used to highlight words or sentences, without giving
#     more importance to them.
# 
#     Note: Despite the name, <b> elements are not necessarily displayed in a
#     bold font. Use CSS for styling purposes.
# 
#     Compare with the Strong, Alternate, and Emphasis elements.
# 
#     Example:
# 
#         >>> span = Span()
#         >>> span.append("The ")
#         >>> span.append(Highlight("swordfish"))
#         >>> span.append(" is a member of the ")
#         >>> span.append(Alternate("Xiphiidae"))
#         >>> span.append(" family.")
#     """
# 
#     def __init__(self, *content):
#         super().__init__("b")
#         self.extend(content)
# 
# class Strong(Element):
#     """An HTML in-line element for strong importance or urgency (<strong>).
# 
#     Compare with the Highlight, Alternate, and Emphasis elements.
# 
#     Example:
# 
#         >>> Strong("It is imperative to turn off the froblunator after use!"))
#     """
# 
#     def __init__(self, *content):
#         super().__init__("strong")
#         self.extend(content)
# 
# class Alternate(Element):
#     """An HTML in-line element for alternate voice text (<i>).
# 
#     This includes the introduction of a term or thoughts.
# 
#     Note: Despite the name, <i> elements are not necessarily displayed in a
#     italic font. Use CSS for styling purposes.
# 
#     Compare with the Highlight, Strong, and Emphasis elements.
# 
#     Example:
# 
#         >>> span = Span()
#         >>> span.append("This is called a ")
#         >>> span.append(Alternate("froblunator"))
#         >>> span.append(".")
#     """
# 
#     def __init__(self, *content):
#         super().__init__("i")
#         self.extend(content)
# 
# class Emphasis(Element):
#     """An HTML stress emphasis (<em>) element.
# 
#     Compare with the Highlight, Strong, and Alternate elements.
# 
#     Example:
# 
#         >>> span = Span()
#         >>> span.append(Emphasis("This"))
#         >>> span.append(" is great.")
#     """
# 
#     def __init__(self, *content):
#         super().__init__("em")
#         self.extend(content)
# 
# class Small(Element):
#     """An HTML in-line element for side comments and small print (<small>).
# 
#     Note: Text inside <small> elements is not necessarily rendered with a
#     smaller font size than surrounding text. Use CSS for styling purposes.
# 
#     Example:
# 
#         >>> Small("Copyright (C) 2010")
#     """
# 
#     def __init__(self, *content):
#         super().__init__("small")
#         self.extend(content)
# 
# class LineBreak(VoidElement):
#     """An HTML line break (<br>) element."""
# 
#     def __init__(self):
#         super().__init__("br")


# Path: test_htmlgen/inline.py
from unittest import TestCase
from asserts import assert_equal
from htmlgen import (
    Span,
    Highlight,
    Strong,
    Alternate,
    Emphasis,
    Small,
    LineBreak,
)

    def test_with_initial_content(self):
        strong = Strong("Initial", "test")
        strong.append("content")
        assert_equal(
            [b"<strong>", b"Initial", b"test", b"content", b"</strong>"],
            list(iter(strong)),
        )


class AlternateTest(TestCase):
    def test_without_initial_content(self):
        alt = Alternate()
        alt.append("Test")
        assert_equal([b"<i>", b"Test", b"</i>"], list(iter(alt)))

    def test_with_initial_content(self):
        alt = Alternate("Initial", "test")
        alt.append("content")
        assert_equal(
            [b"<i>", b"Initial", b"test", b"content", b"</i>"], list(iter(alt))
        )


class EmphasisTest(TestCase):
    def test_without_initial_content(self):
        em = Emphasis()
        em.append("Test")
        assert_equal([b"<em>", b"Test", b"</em>"], list(iter(em)))

    def test_with_initial_content(self):

        em = Emphasis("Initial", "test")