diff --git a/python/pyspark/sql/tests/connect/test_parity_dataframe.py b/python/pyspark/sql/tests/connect/test_parity_dataframe.py index 1575b8fe3a7f3..9293dd71c60d0 100644 --- a/python/pyspark/sql/tests/connect/test_parity_dataframe.py +++ b/python/pyspark/sql/tests/connect/test_parity_dataframe.py @@ -22,9 +22,9 @@ class DataFrameParityTests(DataFrameTestsMixin, ReusedConnectTestCase): - @unittest.skip("Spark Connect does not support RDD but the tests depend on them.") def test_help_command(self): - super().test_help_command() + df = self.spark.createDataFrame(data=[{"foo": "bar"}, {"foo": "baz"}]) + super().check_help_command(df) # Spark Connect throws `IllegalArgumentException` when calling `collect` instead of `sample`. def test_sample(self): diff --git a/python/pyspark/sql/tests/test_dataframe.py b/python/pyspark/sql/tests/test_dataframe.py index 55400c6c7f957..0266b641bfd21 100644 --- a/python/pyspark/sql/tests/test_dataframe.py +++ b/python/pyspark/sql/tests/test_dataframe.py @@ -139,6 +139,9 @@ def test_help_command(self): rdd = self.sc.parallelize(['{"foo":"bar"}', '{"foo":"baz"}']) df = self.spark.read.json(rdd) # render_doc() reproduces the help() exception without printing output + self.check_help_command(df) + + def check_help_command(self, df): pydoc.render_doc(df) pydoc.render_doc(df.foo) pydoc.render_doc(df.take(1))