This is an automated email from the ASF dual-hosted git repository.

ruifengz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new b9cc813adf0 [SPARK-46281][PS][TESTS] Remove unused code in 
`pyspark.pandas.tests.computation.*`
b9cc813adf0 is described below

commit b9cc813adf0ba592f020bc9778b373800ad81b8f
Author: Ruifeng Zheng <ruife...@apache.org>
AuthorDate: Wed Dec 6 17:06:16 2023 +0800

    [SPARK-46281][PS][TESTS] Remove unused code in 
`pyspark.pandas.tests.computation.*`
    
    ### What changes were proposed in this pull request?
    Remove unused code in `pyspark.pandas.tests.computation.*`
    
    ### Why are the changes needed?
    code clean up
    
    ### Does this PR introduce _any_ user-facing change?
    no, test-only
    
    ### How was this patch tested?
    ci
    
    ### Was this patch authored or co-authored using generative AI tooling?
    no
    
    Closes #44200 from zhengruifeng/ps_test_comp_cleanup.
    
    Authored-by: Ruifeng Zheng <ruife...@apache.org>
    Signed-off-by: Ruifeng Zheng <ruife...@apache.org>
---
 python/pyspark/pandas/tests/computation/test_any_all.py     | 13 -------------
 python/pyspark/pandas/tests/computation/test_apply_func.py  |  6 ------
 python/pyspark/pandas/tests/computation/test_binary_ops.py  |  6 ------
 python/pyspark/pandas/tests/computation/test_combine.py     | 13 -------------
 python/pyspark/pandas/tests/computation/test_cumulative.py  | 13 -------------
 python/pyspark/pandas/tests/computation/test_eval.py        |  8 --------
 python/pyspark/pandas/tests/computation/test_melt.py        | 13 -------------
 .../pyspark/pandas/tests/computation/test_missing_data.py   | 13 -------------
 python/pyspark/pandas/tests/computation/test_pivot.py       | 13 -------------
 9 files changed, 98 deletions(-)

diff --git a/python/pyspark/pandas/tests/computation/test_any_all.py 
b/python/pyspark/pandas/tests/computation/test_any_all.py
index 6c120aead4e..5e946be7b08 100644
--- a/python/pyspark/pandas/tests/computation/test_any_all.py
+++ b/python/pyspark/pandas/tests/computation/test_any_all.py
@@ -25,19 +25,6 @@ from pyspark.testing.sqlutils import SQLTestUtils
 
 
 class FrameAnyAllMixin:
-    @property
-    def pdf(self):
-        return pd.DataFrame(
-            {"a": [1, 2, 3, 4, 5, 6, 7, 8, 9], "b": [4, 5, 6, 3, 2, 1, 0, 0, 
0]},
-            index=np.random.rand(9),
-        )
-
-    @property
-    def df_pair(self):
-        pdf = self.pdf
-        psdf = ps.from_pandas(pdf)
-        return pdf, psdf
-
     def test_all(self):
         pdf = pd.DataFrame(
             {
diff --git a/python/pyspark/pandas/tests/computation/test_apply_func.py 
b/python/pyspark/pandas/tests/computation/test_apply_func.py
index 00b14441991..de82c061b58 100644
--- a/python/pyspark/pandas/tests/computation/test_apply_func.py
+++ b/python/pyspark/pandas/tests/computation/test_apply_func.py
@@ -40,12 +40,6 @@ class FrameApplyFunctionMixin:
             index=np.random.rand(9),
         )
 
-    @property
-    def df_pair(self):
-        pdf = self.pdf
-        psdf = ps.from_pandas(pdf)
-        return pdf, psdf
-
     def test_apply(self):
         pdf = pd.DataFrame(
             {
diff --git a/python/pyspark/pandas/tests/computation/test_binary_ops.py 
b/python/pyspark/pandas/tests/computation/test_binary_ops.py
index 99a612576aa..09de7d6d015 100644
--- a/python/pyspark/pandas/tests/computation/test_binary_ops.py
+++ b/python/pyspark/pandas/tests/computation/test_binary_ops.py
@@ -35,12 +35,6 @@ class FrameBinaryOpsMixin:
             index=np.random.rand(9),
         )
 
-    @property
-    def df_pair(self):
-        pdf = self.pdf
-        psdf = ps.from_pandas(pdf)
-        return pdf, psdf
-
     def test_binary_operators(self):
         pdf = pd.DataFrame(
             {"A": [0, 2, 4], "B": [4, 2, 0], "X": [-1, 10, 0]}, 
index=np.random.rand(3)
diff --git a/python/pyspark/pandas/tests/computation/test_combine.py 
b/python/pyspark/pandas/tests/computation/test_combine.py
index 9df4fd7ef2b..4de4dd1cccb 100644
--- a/python/pyspark/pandas/tests/computation/test_combine.py
+++ b/python/pyspark/pandas/tests/computation/test_combine.py
@@ -27,19 +27,6 @@ from pyspark.testing.sqlutils import SQLTestUtils
 # This file contains test cases for 'Combining / joining / merging'
 # 
https://spark.apache.org/docs/latest/api/python/reference/pyspark.pandas/frame.html#combining-joining-merging
 class FrameCombineMixin:
-    @property
-    def pdf(self):
-        return pd.DataFrame(
-            {"a": [1, 2, 3, 4, 5, 6, 7, 8, 9], "b": [4, 5, 6, 3, 2, 1, 0, 0, 
0]},
-            index=np.random.rand(9),
-        )
-
-    @property
-    def df_pair(self):
-        pdf = self.pdf
-        psdf = ps.from_pandas(pdf)
-        return pdf, psdf
-
     def test_concat(self):
         pdf = pd.DataFrame([[1, 2], [3, 4]], columns=list("AB"))
         psdf = ps.from_pandas(pdf)
diff --git a/python/pyspark/pandas/tests/computation/test_cumulative.py 
b/python/pyspark/pandas/tests/computation/test_cumulative.py
index 8c0b14741db..f6c1d893b15 100644
--- a/python/pyspark/pandas/tests/computation/test_cumulative.py
+++ b/python/pyspark/pandas/tests/computation/test_cumulative.py
@@ -25,19 +25,6 @@ from pyspark.testing.sqlutils import SQLTestUtils
 
 
 class FrameCumulativeMixin:
-    @property
-    def pdf(self):
-        return pd.DataFrame(
-            {"a": [1, 2, 3, 4, 5, 6, 7, 8, 9], "b": [4, 5, 6, 3, 2, 1, 0, 0, 
0]},
-            index=np.random.rand(9),
-        )
-
-    @property
-    def df_pair(self):
-        pdf = self.pdf
-        psdf = ps.from_pandas(pdf)
-        return pdf, psdf
-
     def _test_cummin(self, pdf, psdf):
         self.assert_eq(pdf.cummin(), psdf.cummin())
         self.assert_eq(pdf.cummin(skipna=False), psdf.cummin(skipna=False))
diff --git a/python/pyspark/pandas/tests/computation/test_eval.py 
b/python/pyspark/pandas/tests/computation/test_eval.py
index d7b5273a359..712da1478ef 100644
--- a/python/pyspark/pandas/tests/computation/test_eval.py
+++ b/python/pyspark/pandas/tests/computation/test_eval.py
@@ -17,7 +17,6 @@
 
 import unittest
 
-import numpy as np
 import pandas as pd
 
 from pyspark import pandas as ps
@@ -26,13 +25,6 @@ from pyspark.testing.sqlutils import SQLTestUtils
 
 
 class FrameEvalMixin:
-    @property
-    def pdf(self):
-        return pd.DataFrame(
-            {"a": [1, 2, 3, 4, 5, 6, 7, 8, 9], "b": [4, 5, 6, 3, 2, 1, 0, 0, 
0]},
-            index=np.random.rand(9),
-        )
-
     def test_eval(self):
         pdf = pd.DataFrame({"A": range(1, 6), "B": range(10, 0, -2)})
         psdf = ps.from_pandas(pdf)
diff --git a/python/pyspark/pandas/tests/computation/test_melt.py 
b/python/pyspark/pandas/tests/computation/test_melt.py
index c8969a3c0bf..8cb7da1b050 100644
--- a/python/pyspark/pandas/tests/computation/test_melt.py
+++ b/python/pyspark/pandas/tests/computation/test_melt.py
@@ -26,19 +26,6 @@ from pyspark.pandas.utils import name_like_string
 
 
 class FrameMeltMixin:
-    @property
-    def pdf(self):
-        return pd.DataFrame(
-            {"a": [1, 2, 3, 4, 5, 6, 7, 8, 9], "b": [4, 5, 6, 3, 2, 1, 0, 0, 
0]},
-            index=np.random.rand(9),
-        )
-
-    @property
-    def df_pair(self):
-        pdf = self.pdf
-        psdf = ps.from_pandas(pdf)
-        return pdf, psdf
-
     def test_melt(self):
         pdf = pd.DataFrame(
             {"A": [1, 3, 5], "B": [2, 4, 6], "C": [7, 8, 9]}, 
index=np.random.rand(3)
diff --git a/python/pyspark/pandas/tests/computation/test_missing_data.py 
b/python/pyspark/pandas/tests/computation/test_missing_data.py
index c176e79fdab..c11c454af6a 100644
--- a/python/pyspark/pandas/tests/computation/test_missing_data.py
+++ b/python/pyspark/pandas/tests/computation/test_missing_data.py
@@ -28,19 +28,6 @@ from pyspark.testing.sqlutils import SQLTestUtils
 # This file contains test cases for 'Missing data handling'
 # 
https://spark.apache.org/docs/latest/api/python/reference/pyspark.pandas/frame.html#missing-data-handling
 class FrameMissingDataMixin:
-    @property
-    def pdf(self):
-        return pd.DataFrame(
-            {"a": [1, 2, 3, 4, 5, 6, 7, 8, 9], "b": [4, 5, 6, 3, 2, 1, 0, 0, 
0]},
-            index=np.random.rand(9),
-        )
-
-    @property
-    def df_pair(self):
-        pdf = self.pdf
-        psdf = ps.from_pandas(pdf)
-        return pdf, psdf
-
     def test_backfill(self):
         pdf = pd.DataFrame(
             {
diff --git a/python/pyspark/pandas/tests/computation/test_pivot.py 
b/python/pyspark/pandas/tests/computation/test_pivot.py
index e1c55cc552c..8a373108ddc 100644
--- a/python/pyspark/pandas/tests/computation/test_pivot.py
+++ b/python/pyspark/pandas/tests/computation/test_pivot.py
@@ -25,19 +25,6 @@ from pyspark.testing.sqlutils import SQLTestUtils
 
 
 class FramePivotMixin:
-    @property
-    def pdf(self):
-        return pd.DataFrame(
-            {"a": [1, 2, 3, 4, 5, 6, 7, 8, 9], "b": [4, 5, 6, 3, 2, 1, 0, 0, 
0]},
-            index=np.random.rand(9),
-        )
-
-    @property
-    def df_pair(self):
-        pdf = self.pdf
-        psdf = ps.from_pandas(pdf)
-        return pdf, psdf
-
     def test_pivot_table_dtypes(self):
         pdf = pd.DataFrame(
             {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to