# 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)
# 
# def round_trip(
#     inp,
#     outp=None,
#     extra=None,
#     intermediate=None,
#     indent=None,
#     block_seq_indent=None,
#     top_level_colon_align=None,
#     prefix_colon=None,
#     preserve_quotes=None,
#     explicit_start=None,
#     explicit_end=None,
#     version=None,
#     dump_data=None,
# ):
#     """
#     inp:    input string to parse
#     outp:   expected output (equals input if not specified)
#     """
#     if outp is None:
#         outp = inp
#     doutp = dedent(outp)
#     if extra is not None:
#         doutp += extra
#     data = round_trip_load(inp, preserve_quotes=preserve_quotes)
#     if dump_data:
#         print("data", data)
#     if intermediate is not None:
#         if isinstance(intermediate, dict):
#             for k, v in intermediate.items():
#                 if data[k] != v:
#                     print("{0!r} <> {1!r}".format(data[k], v))
#                     raise ValueError
#     res = round_trip_dump(
#         data,
#         indent=indent,
#         block_seq_indent=block_seq_indent,
#         top_level_colon_align=top_level_colon_align,
#         prefix_colon=prefix_colon,
#         explicit_start=explicit_start,
#         explicit_end=explicit_end,
#         version=version,
#     )
#     if res != doutp:
#         diff(doutp, res, "input string")
#     print("\nroundtrip data:\n", res, sep="")
#     assert res == doutp
#     res = round_trip_dump(
#         data,
#         indent=indent,
#         block_seq_indent=block_seq_indent,
#         top_level_colon_align=top_level_colon_align,
#         prefix_colon=prefix_colon,
#         explicit_start=explicit_start,
#         explicit_end=explicit_end,
#         version=version,
#     )
#     print("roundtrip second round data:\n", res, sep="")
#     assert res == doutp
#     return data
# 
# def round_trip_load(inp, preserve_quotes=None, version=None):
#     import srsly.ruamel_yaml  # NOQA
# 
#     dinp = dedent(inp)
#     return srsly.ruamel_yaml.load(
#         dinp,
#         Loader=srsly.ruamel_yaml.RoundTripLoader,
#         preserve_quotes=preserve_quotes,
#         version=version,
#     )


import pytest  # NOQA
    import srsly.ruamel_yaml  # NOQA
        import srsly.ruamel_yaml  # NOQA
        import srsly.ruamel_yaml  # NOQA
        import srsly.ruamel_yaml  # NOQA
from .roundtrip import dedent, round_trip, round_trip_load
        assert r[4] == "0o12"
        assert r[5] is True
        assert r[6] is False
        assert r[7] is True
        assert r[8] is False
        assert r[9] is True


class TestIssue62:
    # bitbucket issue 62, issue_62
    def test_00(self):

        s = dedent(
            """\
        {}# Outside flow collection:
        - ::vector
        - ": - ()"
        - Up, up, and away!
        - -123
        - http://example.com/foo#bar
        # Inside flow collection:
        - [::vector, ": - ()", "Down, down and away!", -456, http://example.com/foo#bar]
        """
        )
        with pytest.raises(srsly.ruamel_yaml.parser.ParserError):
            round_trip(s.format("%YAML 1.1\n---\n"), preserve_quotes=True)
        round_trip(s.format(""), preserve_quotes=True)

    def test_00_single_comment(self):


# 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)
# 
# def round_trip(
#     inp,
#     outp=None,
#     extra=None,
#     intermediate=None,
#     indent=None,
#     block_seq_indent=None,
#     top_level_colon_align=None,
#     prefix_colon=None,
#     preserve_quotes=None,
#     explicit_start=None,
#     explicit_end=None,
#     version=None,
#     dump_data=None,
# ):
#     """
#     inp:    input string to parse
#     outp:   expected output (equals input if not specified)
#     """
#     if outp is None:
#         outp = inp
#     doutp = dedent(outp)
#     if extra is not None:
#         doutp += extra
#     data = round_trip_load(inp, preserve_quotes=preserve_quotes)
#     if dump_data:
#         print("data", data)
#     if intermediate is not None:
#         if isinstance(intermediate, dict):
#             for k, v in intermediate.items():
#                 if data[k] != v:
#                     print("{0!r} <> {1!r}".format(data[k], v))
#                     raise ValueError
#     res = round_trip_dump(
#         data,
#         indent=indent,
#         block_seq_indent=block_seq_indent,
#         top_level_colon_align=top_level_colon_align,
#         prefix_colon=prefix_colon,
#         explicit_start=explicit_start,
#         explicit_end=explicit_end,
#         version=version,
#     )
#     if res != doutp:
#         diff(doutp, res, "input string")
#     print("\nroundtrip data:\n", res, sep="")
#     assert res == doutp
#     res = round_trip_dump(
#         data,
#         indent=indent,
#         block_seq_indent=block_seq_indent,
#         top_level_colon_align=top_level_colon_align,
#         prefix_colon=prefix_colon,
#         explicit_start=explicit_start,
#         explicit_end=explicit_end,
#         version=version,
#     )
#     print("roundtrip second round data:\n", res, sep="")
#     assert res == doutp
#     return data
# 
# def round_trip_load(inp, preserve_quotes=None, version=None):
#     import srsly.ruamel_yaml  # NOQA
# 
#     dinp = dedent(inp)
#     return srsly.ruamel_yaml.load(
#         dinp,
#         Loader=srsly.ruamel_yaml.RoundTripLoader,
#         preserve_quotes=preserve_quotes,
#         version=version,
#     )


# Path: srsly/tests/ruamel_yaml/test_version.py
import pytest  # NOQA
    import srsly.ruamel_yaml  # NOQA
        import srsly.ruamel_yaml  # NOQA
        import srsly.ruamel_yaml  # NOQA
        import srsly.ruamel_yaml  # NOQA
from .roundtrip import dedent, round_trip, round_trip_load

        assert r[4] == "0o12"
        assert r[5] is True
        assert r[6] is False
        assert r[7] is True
        assert r[8] is False
        assert r[9] is True


class TestIssue62:
    # bitbucket issue 62, issue_62
    def test_00(self):

        s = dedent(
            """\
        {}# Outside flow collection:
        - ::vector
        - ": - ()"
        - Up, up, and away!
        - -123
        - http://example.com/foo#bar
        # Inside flow collection:
        - [::vector, ": - ()", "Down, down and away!", -456, http://example.com/foo#bar]
        """
        )
        with pytest.raises(srsly.ruamel_yaml.parser.ParserError):
            round_trip(s.format("%YAML 1.1\n---\n"), preserve_quotes=True)
        round_trip(s.format(""), preserve_quotes=True)

    def test_00_single_comment(self):


        s = dedent(