Browse Source

🎨 Auto format

pull/14710/head
github-actions[bot] 6 months ago
parent
commit
e6a08f313d
  1. 8
      scripts/tests/test_translation_fixer/test_code_blocks/test_code_blocks_lines_number_mismatch.py
  2. 1
      scripts/tests/test_translation_fixer/test_code_includes/test_number_mismatch.py
  3. 4
      scripts/tests/test_translation_fixer/test_html_links/test_html_links_number_mismatch.py

8
scripts/tests/test_translation_fixer/test_code_blocks/test_code_blocks_lines_number_mismatch.py

@ -23,7 +23,9 @@ def test_gt(runner: CliRunner, root_dir: Path, copy_test_files):
assert result.exit_code == 1, result.output assert result.exit_code == 1, result.output
fixed_content = (root_dir / "docs" / "lang" / "docs" / "doc.md").read_text() fixed_content = (root_dir / "docs" / "lang" / "docs" / "doc.md").read_text()
expected_content = Path(f"{data_path}/translated_doc_lines_number_gt.md").read_text() expected_content = Path(
f"{data_path}/translated_doc_lines_number_gt.md"
).read_text()
assert fixed_content == expected_content # Translated doc remains unchanged assert fixed_content == expected_content # Translated doc remains unchanged
assert "Error processing docs/lang/docs/doc.md" in result.output assert "Error processing docs/lang/docs/doc.md" in result.output
@ -45,7 +47,9 @@ def test_lt(runner: CliRunner, root_dir: Path, copy_test_files):
# assert result.exit_code == 1, result.output # assert result.exit_code == 1, result.output
fixed_content = (root_dir / "docs" / "lang" / "docs" / "doc.md").read_text() fixed_content = (root_dir / "docs" / "lang" / "docs" / "doc.md").read_text()
expected_content = Path(f"{data_path}/translated_doc_lines_number_lt.md").read_text() expected_content = Path(
f"{data_path}/translated_doc_lines_number_lt.md"
).read_text()
assert fixed_content == expected_content # Translated doc remains unchanged assert fixed_content == expected_content # Translated doc remains unchanged
assert "Error processing docs/lang/docs/doc.md" in result.output assert "Error processing docs/lang/docs/doc.md" in result.output

1
scripts/tests/test_translation_fixer/test_code_includes/test_number_mismatch.py

@ -54,4 +54,3 @@ def test_lt(runner: CliRunner, root_dir: Path, copy_test_files):
"Number of code include placeholders does not match the number of code includes " "Number of code include placeholders does not match the number of code includes "
"in the original document (2 vs 3)" "in the original document (2 vs 3)"
) in result.output ) in result.output

4
scripts/tests/test_translation_fixer/test_html_links/test_html_links_number_mismatch.py

@ -5,9 +5,7 @@ from typer.testing import CliRunner
from scripts.translation_fixer import cli from scripts.translation_fixer import cli
data_path = Path( data_path = Path("scripts/tests/test_translation_fixer/test_html_links/data").absolute()
"scripts/tests/test_translation_fixer/test_html_links/data"
).absolute()
@pytest.mark.parametrize( @pytest.mark.parametrize(

Loading…
Cancel
Save