Home / Function/ test_loading_with_template_as_file() — langchain Function Reference

test_loading_with_template_as_file() — langchain Function Reference

Architecture documentation for the test_loading_with_template_as_file() function in test_loading.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  c1870b2b_3829_9100_8e5c_ee35de86fb94["test_loading_with_template_as_file()"]
  eea05055_0cc3_c5ac_867f_b44ce74a7c7b["test_loading.py"]
  c1870b2b_3829_9100_8e5c_ee35de86fb94 -->|defined in| eea05055_0cc3_c5ac_867f_b44ce74a7c7b
  a39a8c67_0bca_5506_7c34_c56c38051b9f["change_directory()"]
  c1870b2b_3829_9100_8e5c_ee35de86fb94 -->|calls| a39a8c67_0bca_5506_7c34_c56c38051b9f
  style c1870b2b_3829_9100_8e5c_ee35de86fb94 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/prompts/test_loading.py lines 91–99

def test_loading_with_template_as_file() -> None:
    """Test loading when the template is a file."""
    with change_directory(EXAMPLE_DIR):
        prompt = load_prompt("simple_prompt_with_template_file.json")
        expected_prompt = PromptTemplate(
            input_variables=["adjective", "content"],
            template="Tell me a {adjective} joke about {content}.",
        )
        assert prompt == expected_prompt

Subdomains

Frequently Asked Questions

What does test_loading_with_template_as_file() do?
test_loading_with_template_as_file() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/prompts/test_loading.py.
Where is test_loading_with_template_as_file() defined?
test_loading_with_template_as_file() is defined in libs/core/tests/unit_tests/prompts/test_loading.py at line 91.
What does test_loading_with_template_as_file() call?
test_loading_with_template_as_file() calls 1 function(s): change_directory.

Analyze Your Own Codebase

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

Try Supermodel Free