Skip to content

Commit 7bbad35

Browse files
committed
[SPARK-51078][SPARK-50963][ML][PYTHON][CONNECT][TESTS][FOLLOW-UP] Add back tests for default value
### What changes were proposed in this pull request? add back tests deleted in e0a7db2#diff-50e109673576cc6d4f8727f54076b0884b93b759c49d98c908581db7093cb5ab ### Why are the changes needed? for coverage, `StopWordRemover`'s default value implementation is special ### Does this PR introduce _any_ user-facing change? no ### How was this patch tested? ci ### Was this patch authored or co-authored using generative AI tooling? no Closes #50067 from zhengruifeng/ml_connect_test_swr. Authored-by: Ruifeng Zheng <[email protected]> Signed-off-by: Ruifeng Zheng <[email protected]> (cherry picked from commit 7e5bf72) Signed-off-by: Ruifeng Zheng <[email protected]>
1 parent 5da203e commit 7bbad35

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

python/pyspark/ml/tests/test_feature.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -891,6 +891,8 @@ def test_stop_words_remover_with_given_words(self):
891891
self.assertEqual(stopWordRemover.getInputCol(), "input")
892892
transformedDF = stopWordRemover.transform(dataset)
893893
self.assertEqual(transformedDF.head().output, ["panda"])
894+
self.assertEqual(type(stopWordRemover.getStopWords()), list)
895+
self.assertTrue(isinstance(stopWordRemover.getStopWords()[0], str))
894896
# Custom
895897
stopwords = ["panda"]
896898
stopWordRemover.setStopWords(stopwords)

0 commit comments

Comments
 (0)