Skip to content

Commit

Permalink
test: add patch to unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleKing committed Dec 18, 2024
1 parent b52fd27 commit ddd42ca
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,19 +345,17 @@ def test_eol__check_keep_crlf(tmp_path):
assert run((str(file_path), "--check", "--end-of-line=keep")) == 1


@pytest.mark.skip
def test_no_validate(tmp_path):
# FIXME: Fake an mdformat bug that renders to a different HTML
with patch("mdformat.renderer._context.get_list_marker_type", return_value="?"):
file_path = tmp_path / "test.md"
content = "1. ordered"
file_path.write_text(content)

file_path = tmp_path / "test.md"
content = "2. ordered"
file_path.write_text(content)

assert run((str(file_path),)) == 1
assert file_path.read_text() == content
assert run((str(file_path),)) == 1
assert file_path.read_text() == content

assert run((str(file_path), "--no-validate")) == 0
assert file_path.read_text() != content
assert run((str(file_path), "--no-validate")) == 0
assert file_path.read_text() == "1? ordered\n"


def test_get_plugin_info_str():
Expand Down

0 comments on commit ddd42ca

Please sign in to comment.