MCPcopy
hub / github.com/RasaHQ/rasa / test_execution_context

Function test_execution_context

tests/engine/runner/test_dask.py:246–268  ·  view source on GitHub ↗
(default_model_storage: ModelStorage)

Source from the content-addressed store, hash-verified

244
245
246def test_execution_context(default_model_storage: ModelStorage):
247 graph_schema = GraphSchema(
248 {
249 "execution_context_aware": SchemaNode(
250 needs={},
251 uses=ExecutionContextAware,
252 fn="get_execution_context",
253 constructor_name="create",
254 config={},
255 is_target=True,
256 )
257 }
258 )
259 context = ExecutionContext(graph_schema=graph_schema, model_id="some_id")
260 runner = DaskGraphRunner(
261 graph_schema=graph_schema,
262 model_storage=default_model_storage,
263 execution_context=context,
264 )
265 context.model_id = "a_new_id"
266 result = runner.run()["execution_context_aware"]
267 assert result.model_id == "some_id"
268 assert result.node_name == "execution_context_aware"
269
270
271def test_input_value_is_node_name(default_model_storage: ModelStorage):

Callers

nothing calls this directly

Calls 5

runMethod · 0.95
GraphSchemaClass · 0.90
SchemaNodeClass · 0.90
ExecutionContextClass · 0.90
DaskGraphRunnerClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…