|
|
|
@ -23,18 +23,24 @@ def test_translated(runner: CliRunner, root_dir: Path, copy_test_files): |
|
|
|
assert result.exit_code == 0, result.output |
|
|
|
|
|
|
|
fixed_content = (root_dir / "docs" / "lang" / "docs" / "doc.md").read_text() |
|
|
|
expected_content = Path(f"{data_path}/translated_doc_mermaid_translated.md").read_text() |
|
|
|
expected_content = Path( |
|
|
|
f"{data_path}/translated_doc_mermaid_translated.md" |
|
|
|
).read_text() |
|
|
|
|
|
|
|
assert fixed_content == expected_content # Translated doc remains unchanged |
|
|
|
assert ( |
|
|
|
"Skipping mermaid code block replacement. This should be checked manually." |
|
|
|
"Skipping mermaid code block replacement (lines 41-44). This should be checked manually." |
|
|
|
) in result.output |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.mark.parametrize( |
|
|
|
"copy_test_files", |
|
|
|
[(f"{data_path}/en_doc.md", f"{data_path}/translated_doc_mermaid_not_translated.md")], |
|
|
|
[ |
|
|
|
( |
|
|
|
f"{data_path}/en_doc.md", |
|
|
|
f"{data_path}/translated_doc_mermaid_not_translated.md", |
|
|
|
) |
|
|
|
], |
|
|
|
indirect=True, |
|
|
|
) |
|
|
|
def test_not_translated(runner: CliRunner, root_dir: Path, copy_test_files): |
|
|
|
@ -45,9 +51,9 @@ def test_not_translated(runner: CliRunner, root_dir: Path, copy_test_files): |
|
|
|
assert result.exit_code == 0, result.output |
|
|
|
|
|
|
|
fixed_content = (root_dir / "docs" / "lang" / "docs" / "doc.md").read_text() |
|
|
|
expected_content = Path(f"{data_path}/translated_doc_mermaid_not_translated.md").read_text() |
|
|
|
expected_content = Path( |
|
|
|
f"{data_path}/translated_doc_mermaid_not_translated.md" |
|
|
|
).read_text() |
|
|
|
|
|
|
|
assert fixed_content == expected_content # Translated doc remains unchanged |
|
|
|
assert ( |
|
|
|
"Skipping mermaid code block replacement. This should be checked manually." |
|
|
|
) not in result.output |
|
|
|
assert ("Skipping mermaid code block replacement") not in result.output |
|
|
|
|