# Path: srsly/tests/ruamel_yaml/roundtrip.py
# def dedent(data):
#     try:
#         position_of_first_newline = data.index("\n")
#         for idx in range(position_of_first_newline):
#             if not data[idx].isspace():
#                 raise ValueError
#     except ValueError:
#         pass
#     else:
#         data = data[position_of_first_newline + 1 :]
#     return textwrap.dedent(data)


from .roundtrip import dedent
        """)
        # fmt: on
        assert x == "123\n"

    def test_start_no_newline(self):
        # special construct to prevent stripping of following whitespac
        x = dedent(
            """\
        123
          456
        """
        )
        assert x == "123\n  456\n"

    def test_preserve_no_newline_at_end(self):
        x = dedent(
            """
        123"""
        )
        assert x == "123"

    def test_preserve_no_newline_at_all(self):
        x = dedent(
            """\
        123"""
        )
        assert x == "123"

    def test_multiple_dedent(self):
        x = dedent(

# Path: srsly/tests/ruamel_yaml/roundtrip.py
# def dedent(data):
#     try:
#         position_of_first_newline = data.index("\n")
#         for idx in range(position_of_first_newline):
#             if not data[idx].isspace():
#                 raise ValueError
#     except ValueError:
#         pass
#     else:
#         data = data[position_of_first_newline + 1 :]
#     return textwrap.dedent(data)


# Path: srsly/tests/ruamel_yaml/test_a_dedent.py
from .roundtrip import dedent

        """)
        # fmt: on
        assert x == "123\n"

    def test_start_no_newline(self):
        # special construct to prevent stripping of following whitespac
        x = dedent(
            """\
        123
          456
        """
        )
        assert x == "123\n  456\n"

    def test_preserve_no_newline_at_end(self):
        x = dedent(
            """
        123"""
        )
        assert x == "123"

    def test_preserve_no_newline_at_all(self):
        x = dedent(
            """\
        123"""
        )
        assert x == "123"

    def test_multiple_dedent(self):
        x = dedent(

            dedent(