test_prompt_invalid_template_format() — langchain Function Reference
Architecture documentation for the test_prompt_invalid_template_format() function in test_prompt.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD fc2e8c11_3af5_f484_e11a_2af68a956002["test_prompt_invalid_template_format()"] af1b998b_a7bf_9d5c_32ef_bab507a6bee3["test_prompt.py"] fc2e8c11_3af5_f484_e11a_2af68a956002 -->|defined in| af1b998b_a7bf_9d5c_32ef_bab507a6bee3 style fc2e8c11_3af5_f484_e11a_2af68a956002 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/prompts/test_prompt.py lines 342–351
def test_prompt_invalid_template_format() -> None:
"""Test initializing a prompt with invalid template format."""
template = "This is a {foo} test."
input_variables = ["foo"]
with pytest.raises(ValueError, match="Unsupported template format: bar"):
PromptTemplate(
input_variables=input_variables,
template=template,
template_format="bar",
)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_prompt_invalid_template_format() do?
test_prompt_invalid_template_format() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/prompts/test_prompt.py.
Where is test_prompt_invalid_template_format() defined?
test_prompt_invalid_template_format() is defined in libs/core/tests/unit_tests/prompts/test_prompt.py at line 342.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free