mirror of
https://github.com/langgenius/dify.git
synced 2026-06-09 17:32:00 +08:00
Co-authored-by: Copilot <copilot@github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
16 lines
523 B
Python
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())
|