From 8f1bcd774f3671086ab86a469d4cdf6f27f0d3f9 Mon Sep 17 00:00:00 2001 From: phi Date: Thu, 3 Oct 2024 16:14:04 +0900 Subject: [PATCH] tests: jinja lambda_error --- src/tests/executor/test_executor.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tests/executor/test_executor.py b/src/tests/executor/test_executor.py index 70ccf1b..846b660 100644 --- a/src/tests/executor/test_executor.py +++ b/src/tests/executor/test_executor.py @@ -199,6 +199,11 @@ def awaitable_func() -> Awaitable[Any]: class TestJinjaExecutorSync(TestExecutorSync): use_jinja = True + def test_lambda_error(self): + lambda_func = lambda: 123 # noqa: E731 + with pytest.raises(ValueError, match="lambda function is not supported"): + self.executor(1).apply(lambda_func) + class TestJinjaExecutorAsync(TestExecutorAsync): use_jinja = True