Home / Function/ test_wrong_lang_code_2() — fastapi Function Reference

test_wrong_lang_code_2() — fastapi Function Reference

Architecture documentation for the test_wrong_lang_code_2() function in test_code_blocks_wrong_lang_code.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  b9554692_8c6e_bac1_bc8c_d18f2175528b["test_wrong_lang_code_2()"]
  4382d5e1_6eca_318d_8c89_ecab455c564e["test_code_blocks_wrong_lang_code.py"]
  b9554692_8c6e_bac1_bc8c_d18f2175528b -->|defined in| 4382d5e1_6eca_318d_8c89_ecab455c564e
  style b9554692_8c6e_bac1_bc8c_d18f2175528b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

scripts/tests/test_translation_fixer/test_code_blocks/test_code_blocks_wrong_lang_code.py lines 42–58

def test_wrong_lang_code_2(runner: CliRunner, root_dir: Path, copy_test_files):
    result = runner.invoke(
        cli,
        ["fix-pages", "docs/lang/docs/doc.md"],
    )
    assert result.exit_code == 1, result.output

    fixed_content = (root_dir / "docs" / "lang" / "docs" / "doc.md").read_text("utf-8")
    expected_content = Path(
        f"{data_path}/translated_doc_wrong_lang_code_2.md"
    ).read_text("utf-8")

    assert fixed_content == expected_content  # Translated doc remains unchanged
    assert "Error processing docs/lang/docs/doc.md" in result.output
    assert (
        "Code block (lines 16-19) has different language than the original block ('' vs 'toml')"
    ) in result.output

Domain

Subdomains

Frequently Asked Questions

What does test_wrong_lang_code_2() do?
test_wrong_lang_code_2() is a function in the fastapi codebase, defined in scripts/tests/test_translation_fixer/test_code_blocks/test_code_blocks_wrong_lang_code.py.
Where is test_wrong_lang_code_2() defined?
test_wrong_lang_code_2() is defined in scripts/tests/test_translation_fixer/test_code_blocks/test_code_blocks_wrong_lang_code.py at line 42.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free