# Path: markdown_it/cli/parse.py
# def main(args: Sequence[str] | None = None) -> int:
# def convert(filenames: Iterable[str]) -> None:
# def convert_file(filename: str) -> None:
# def interactive() -> None:
# def parse_args(args: Sequence[str] | None) -> argparse.Namespace:
# def print_heading() -> None:


import pathlib
import tempfile
import pytest
from unittest.mock import patch
from markdown_it.cli import parse




def test_parse():
    with tempfile.TemporaryDirectory() as tempdir:
        path = pathlib.Path(tempdir).joinpath("test.md")
        path.write_text("a b c")
        assert parse.main([str(path)]) == 0


def test_parse_fail():
    with pytest.raises(SystemExit) as exc_info:

# Path: markdown_it/cli/parse.py
# def main(args: Sequence[str] | None = None) -> int:
# def convert(filenames: Iterable[str]) -> None:
# def convert_file(filename: str) -> None:
# def interactive() -> None:
# def parse_args(args: Sequence[str] | None) -> argparse.Namespace:
# def print_heading() -> None:


# Path: tests/test_cli.py
import pathlib
import tempfile
import pytest
from unittest.mock import patch
from markdown_it.cli import parse





def test_parse():
    with tempfile.TemporaryDirectory() as tempdir:
        path = pathlib.Path(tempdir).joinpath("test.md")
        path.write_text("a b c")
        assert parse.main([str(path)]) == 0


def test_parse_fail():
    with pytest.raises(SystemExit) as exc_info:

        parse.main(["/tmp/nonexistant_path/for_cli_test.md"])