def test_Pipegraph__fit_connections(self): pgraph = PipeGraph(self.steps, self.connections) pgraph.fit(self.X, self.y) fit_nodes_list = list(pgraph._filter_fit_nodes()) self.assertEqual( sorted(fit_nodes_list), sorted([ 'Concatenate_Xy', 'Gaussian_Mixture', 'Dbscan', 'Combine_Clustering', 'Regressor', ]))
def test_Pipegraph__some_fit_connections(self): some_connections = { 'Concatenate_Xy': dict(df1='X', df2='y'), 'Gaussian_Mixture': dict(X=('Concatenate_Xy', 'predict')), 'Dbscan': dict(X=('Concatenate_Xy', 'predict')), } pgraph = PipeGraph(steps=self.steps, fit_connections=some_connections, predict_connections=self.connections) pgraph.fit(self.X, self.y) fit_nodes_list = list(pgraph._filter_fit_nodes()) self.assertEqual( sorted(fit_nodes_list), sorted([ 'Concatenate_Xy', 'Gaussian_Mixture', 'Dbscan', ]))