Dharmesh Soni
04/19/2023, 11:20 AMimport_pipelines
is returning a dictionary. When I try to import import_pipelines
into the test, it is not producing any results. I tried to print the results within class and it is printing but when I try to print in the test it is not. Can someone help here?marrrcin
04/19/2023, 11:31 AMimport_pipelines
? If you’re relying on Kedro auto discovery mechanism here, you most likely need to bootstrap the project in tests, before trying to obtain the pipelines.
Alternatively, you can also mock the pipelines dict directly:
dummy_pipeline = pipeline([node(lambda a: a, inputs="a", outputs="b", name="node1"])
with patch.dict(
"kedro.framework.project.pipelines", {"__default__": dummy_pipeline}
):
# test code