()
| 227 | |
| 228 | |
| 229 | def test_function_with_context(): |
| 230 | func_schema = function_schema(function_with_context) |
| 231 | assert func_schema.takes_context |
| 232 | |
| 233 | context = RunContextWrapper(context="test") |
| 234 | |
| 235 | input = {"a": 1, "b": 2} |
| 236 | parsed = func_schema.params_pydantic_model(**input) |
| 237 | args, kwargs_dict = func_schema.to_call_args(parsed) |
| 238 | |
| 239 | result = function_with_context(context, *args, **kwargs_dict) |
| 240 | assert result == 3 |
| 241 | |
| 242 | |
| 243 | class MyClass: |
nothing calls this directly
no test coverage detected