From 6fc2c3d04da8c96debf1966845bdc4573e7315f7 Mon Sep 17 00:00:00 2001 From: "Danilo J. S. Bellini" Date: Sat, 15 Jul 2023 14:27:34 -0300 Subject: [PATCH] Call _validate_steps in pipeline tests This is a required step as that method is not called by scikit-learn during pipeline construction --- tests/test_pipeline.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/test_pipeline.py b/tests/test_pipeline.py index 0f1c2c5dd..957634183 100644 --- a/tests/test_pipeline.py +++ b/tests/test_pipeline.py @@ -92,7 +92,7 @@ def test_validate_steps(self): ("bad", Thing()), ("model", MockEstimator()), ] - ) + )._validate_steps() # validate a bad intermediate transformer on the VisualPipeline with pytest.raises(TypeError): @@ -102,15 +102,17 @@ def test_validate_steps(self): ("bad", Thing()), ("model", MockEstimator()), ] - ) + )._validate_steps() # validate a bad final estimator on the Pipeline with pytest.raises(TypeError): - Pipeline([("real", MockTransformer()), ("bad", Thing())]) + Pipeline([("real", MockTransformer()), ("bad", Thing())])._validate_steps() # validate a bad final estimator on the VisualPipeline with pytest.raises(TypeError): - VisualPipeline([("real", MockTransformer()), ("bad", Thing())]) + VisualPipeline( + [("real", MockTransformer()), ("bad", Thing())] + )._validate_steps() # validate visual transformers on a Pipeline try: