def test_save_fitted_load_predict(resource_tmp_file): p = Pipe() +\ Segment(anova_filter, 'anova') +\ Segment(clf, 'svc') p.fit(X, y) p._save(resource_tmp_file) p = Pipe._load(resource_tmp_file) p.predict(X)
def test_load_after_dump(resource_tmp_file): p = Pipe._load(resource_tmp_file) assert p(2) == 4