(default_model_storage: ModelStorage)
| 244 | |
| 245 | |
| 246 | def 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 | |
| 271 | def test_input_value_is_node_name(default_model_storage: ModelStorage): |
nothing calls this directly
no test coverage detected
searching dependent graphs…