Github user yanboliang commented on a diff in the pull request:
https://github.com/apache/spark/pull/10216#discussion_r49175186
--- Diff: python/pyspark/ml/tests.py ---
@@ -163,6 +163,14 @@ def setParams(self, seed=None):
class ParamTests(PySparkTestCase):
+ def test_copy_new_parent(self):
+ testParams = TestParams()
+ # Copying an instantiated param should fail
+ with self.assertRaises(ValueError):
+ testParams.maxIter._copy_new_parent(testParams)
+ # Copying a dummy param should succeed
+ TestParams.maxIter._copy_new_parent(testParams)
+
--- End diff --
Here we should also check the param's name, doc and parent are right just
like what we do at ```test_param```.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]