dify/dify-agent/tests/local/agenton/layers/test_layer_deps.py
盐粒 Yanli 55f95dbc36
feat(agent): init agent server (#36087)
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-14 06:04:44 +00:00

16 lines
523 B
Python

import pytest
from agenton.layers import LayerDeps
from agenton_collections.layers.plain import ObjectLayer, PromptLayer
class ObjectLayerDeps(LayerDeps):
"""Deps container used to exercise runtime dependency validation."""
object_layer: ObjectLayer[str] # pyright: ignore[reportUninitializedInstanceVariable]
def test_layer_deps_rejects_mismatched_runtime_layer_class() -> None:
with pytest.raises(TypeError, match="should be of type 'ObjectLayer'"):
ObjectLayerDeps(object_layer=PromptLayer())