gaogaotiantian commented on code in PR #59363:
URL: https://github.com/apache/spark/pull/59363#discussion_r4240677954


##########
python/pyspark/ml/tests/test_linalg.py:
##########
@@ -338,6 +338,30 @@ def test_serialization(self):
         for v in [self.dv0, self.dv1, self.sv0, self.sv1]:
             self.assertEqual(v, self.udt.deserialize(self.udt.serialize(v)))
 
+    def test_serialization_invalid_object(self):
+        invalid_object = [1.0, 2.0]
+
+        with self.assertRaises(TypeError):
+            self.udt.serialize(invalid_object)
+
+    def test_deserialization_invalid_length(self):
+        two_fields = (1, [1.0, 2.0])
+        three_fields = (1, None, [1.0, 2.0])
+        five_fields = (1, None, None, None, [1.0, 2.0])
+
+        with self.assertRaises(AssertionError):

Review Comment:
   You shouldn't need to trigger assertion error. Is this the scipy thing where 
the coverage environment just does not match?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to