# Path: wikitextparser/_comment_bold_italic.py
# class Bold(BoldItalic):
#     __slots__ = ()
# 
#     @property
#     def _match(self):
#         return BOLD_FULLMATCH(self.string)
# 
# class Comment(SubWikiText):
#     __slots__ = ()
# 
#     @property
#     def contents(self) -> str:
#         """Return contents of this comment."""
#         s = self.string
#         if s[-3:] == '-->':
#             return s[4:-3]
#         return s[4:]
# 
#     @property
#     def comments(self) -> List['Comment']:
#         return []
# 
# class Italic(BoldItalic):
#     __slots__ = 'end_token',
# 
#     def __init__(
#         self,
#         string: Union[str, MutableSequence[str]],
#         _type_to_spans: Optional[Dict[str, List[List[int]]]] = None,
#         _span: Optional[List[int]] = None,
#         _type: Optional[Union[str, int]] = None,
#         end_token: bool = True,
#     ):
#         """Initialize the Italic object.
# 
#         :param end_token: set to True if the italic object ends with a '' token
#             False otherwise.
#         """
#         super().__init__(string, _type_to_spans, _span, _type)
#         self.end_token = end_token
# 
#     @property
#     def _match(self):
#         if self.end_token:
#             return ITALIC_FULLMATCH(self.string)
#         return ITALIC_NOEND_FULLMATCH(self.string)


﻿from wikitextparser import Bold, Comment, Italic


def test_comment():
    c = Comment('<!-- c -->')
    assert repr(c) == "Comment('<!-- c -->')"
    assert c.comments == []


def test_bold():
    assert Bold("'''b'''").text == 'b'

# Path: wikitextparser/_comment_bold_italic.py
# class Bold(BoldItalic):
#     __slots__ = ()
# 
#     @property
#     def _match(self):
#         return BOLD_FULLMATCH(self.string)
# 
# class Comment(SubWikiText):
#     __slots__ = ()
# 
#     @property
#     def contents(self) -> str:
#         """Return contents of this comment."""
#         s = self.string
#         if s[-3:] == '-->':
#             return s[4:-3]
#         return s[4:]
# 
#     @property
#     def comments(self) -> List['Comment']:
#         return []
# 
# class Italic(BoldItalic):
#     __slots__ = 'end_token',
# 
#     def __init__(
#         self,
#         string: Union[str, MutableSequence[str]],
#         _type_to_spans: Optional[Dict[str, List[List[int]]]] = None,
#         _span: Optional[List[int]] = None,
#         _type: Optional[Union[str, int]] = None,
#         end_token: bool = True,
#     ):
#         """Initialize the Italic object.
# 
#         :param end_token: set to True if the italic object ends with a '' token
#             False otherwise.
#         """
#         super().__init__(string, _type_to_spans, _span, _type)
#         self.end_token = end_token
# 
#     @property
#     def _match(self):
#         if self.end_token:
#             return ITALIC_FULLMATCH(self.string)
#         return ITALIC_NOEND_FULLMATCH(self.string)


# Path: tests/test_comment_bold_italic.py
﻿from wikitextparser import Bold, Comment, Italic



def test_comment():
    c = Comment('<!-- c -->')
    assert repr(c) == "Comment('<!-- c -->')"
    assert c.comments == []


def test_bold():
    assert Bold("'''b'''").text == 'b'

    assert Bold("'<!---->''b'''").text == 'b'