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 d34d9b39aec0 [SPARK-46422][PS][TESTS] Move `test_window` to 
`pyspark.pandas.tests.window.*`
d34d9b39aec0 is described below

commit d34d9b39aec05735fd076dce97f0b3dafb81ba45
Author: Ruifeng Zheng <ruife...@apache.org>
AuthorDate: Sat Dec 16 09:30:16 2023 +0800

    [SPARK-46422][PS][TESTS] Move `test_window` to 
`pyspark.pandas.tests.window.*`
    
    ### What changes were proposed in this pull request?
    1, Move `test_window` to `pyspark.pandas.tests.window.*`
    2, rename to `test_missing`
    
    ### Why are the changes needed?
    we use `pyspark.pandas.tests.window.*` to place all window-related tests;
    `test_window` is confusing, it just test the missing stuffs
    
    ### 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 #44371 from zhengruifeng/ps_test_window_missing.
    
    Authored-by: Ruifeng Zheng <ruife...@apache.org>
    Signed-off-by: Ruifeng Zheng <ruife...@apache.org>
---
 dev/sparktestsupport/modules.py                              |  4 ++--
 .../{test_parity_window.py => window/test_parity_missing.py} | 12 +++++++-----
 .../pandas/tests/{test_window.py => window/test_missing.py}  | 11 +++++++----
 3 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/dev/sparktestsupport/modules.py b/dev/sparktestsupport/modules.py
index a9feb43e9ef1..9d33b1d21fdf 100644
--- a/dev/sparktestsupport/modules.py
+++ b/dev/sparktestsupport/modules.py
@@ -760,6 +760,7 @@ pyspark_pandas = Module(
         "pyspark.pandas.tests.reshape.test_get_dummies_object",
         "pyspark.pandas.tests.reshape.test_get_dummies_prefix",
         "pyspark.pandas.tests.reshape.test_merge_asof",
+        "pyspark.pandas.tests.window.test_missing",
         "pyspark.pandas.tests.window.test_rolling",
         "pyspark.pandas.tests.window.test_rolling_adv",
         "pyspark.pandas.tests.window.test_rolling_count",
@@ -776,7 +777,6 @@ pyspark_pandas = Module(
         "pyspark.pandas.tests.test_sql",
         "pyspark.pandas.tests.test_typedef",
         "pyspark.pandas.tests.test_utils",
-        "pyspark.pandas.tests.test_window",
     ],
     excluded_python_implementations=[
         "PyPy"  # Skip these tests under PyPy since they require numpy, 
pandas, and pyarrow and
@@ -1035,7 +1035,6 @@ pyspark_pandas_connect_part0 = Module(
         "pyspark.pandas.tests.connect.test_parity_sql",
         "pyspark.pandas.tests.connect.test_parity_typedef",
         "pyspark.pandas.tests.connect.test_parity_utils",
-        "pyspark.pandas.tests.connect.test_parity_window",
         "pyspark.pandas.tests.connect.indexes.test_parity_base",
         "pyspark.pandas.tests.connect.indexes.test_parity_align",
         "pyspark.pandas.tests.connect.indexes.test_parity_indexing",
@@ -1146,6 +1145,7 @@ pyspark_pandas_connect_part2 = Module(
         "pyspark.pandas.tests.connect.window.test_parity_ewm_error",
         "pyspark.pandas.tests.connect.window.test_parity_ewm_mean",
         "pyspark.pandas.tests.connect.window.test_parity_groupby_ewm_mean",
+        "pyspark.pandas.tests.connect.window.test_parity_missing",
         "pyspark.pandas.tests.connect.window.test_parity_rolling",
         "pyspark.pandas.tests.connect.window.test_parity_rolling_adv",
         "pyspark.pandas.tests.connect.window.test_parity_rolling_count",
diff --git a/python/pyspark/pandas/tests/connect/test_parity_window.py 
b/python/pyspark/pandas/tests/connect/window/test_parity_missing.py
similarity index 76%
rename from python/pyspark/pandas/tests/connect/test_parity_window.py
rename to python/pyspark/pandas/tests/connect/window/test_parity_missing.py
index dc542775ad06..a42d759dd8b0 100644
--- a/python/pyspark/pandas/tests/connect/test_parity_window.py
+++ b/python/pyspark/pandas/tests/connect/window/test_parity_missing.py
@@ -16,19 +16,21 @@
 #
 import unittest
 
-from pyspark.pandas.tests.test_window import ExpandingRollingTestsMixin
+from pyspark.pandas.tests.window.test_missing import MissingMixin
 from pyspark.testing.connectutils import ReusedConnectTestCase
-from pyspark.testing.pandasutils import PandasOnSparkTestUtils, TestUtils
+from pyspark.testing.pandasutils import PandasOnSparkTestUtils
 
 
-class ExpandingRollingParityTests(
-    ExpandingRollingTestsMixin, PandasOnSparkTestUtils, TestUtils, 
ReusedConnectTestCase
+class MissingParityTests(
+    MissingMixin,
+    PandasOnSparkTestUtils,
+    ReusedConnectTestCase,
 ):
     pass
 
 
 if __name__ == "__main__":
-    from pyspark.pandas.tests.connect.test_parity_window import *  # noqa: F401
+    from pyspark.pandas.tests.connect.window.test_parity_missing import *  # 
noqa: F401
 
     try:
         import xmlrunner  # type: ignore[import]
diff --git a/python/pyspark/pandas/tests/test_window.py 
b/python/pyspark/pandas/tests/window/test_missing.py
similarity index 98%
rename from python/pyspark/pandas/tests/test_window.py
rename to python/pyspark/pandas/tests/window/test_missing.py
index 33f06a11da2d..81d6a5101e5b 100644
--- a/python/pyspark/pandas/tests/test_window.py
+++ b/python/pyspark/pandas/tests/window/test_missing.py
@@ -27,10 +27,10 @@ from pyspark.pandas.missing.window import (
     MissingPandasLikeExponentialMoving,
     MissingPandasLikeExponentialMovingGroupby,
 )
-from pyspark.testing.pandasutils import PandasOnSparkTestCase, TestUtils
+from pyspark.testing.pandasutils import PandasOnSparkTestCase
 
 
-class ExpandingRollingTestsMixin:
+class MissingMixin:
     def test_missing(self):
         psdf = ps.DataFrame({"a": [1, 2, 3, 4, 5, 6, 7, 8, 9]})
 
@@ -448,13 +448,16 @@ class ExpandingRollingTestsMixin:
                 getattr(psdf.a.ewm(com=0.5), name)()  # Series
 
 
-class ExpandingRollingTests(ExpandingRollingTestsMixin, PandasOnSparkTestCase, 
TestUtils):
+class MissingTests(
+    MissingMixin,
+    PandasOnSparkTestCase,
+):
     pass
 
 
 if __name__ == "__main__":
     import unittest
-    from pyspark.pandas.tests.test_window import *  # noqa: F401
+    from pyspark.pandas.tests.window.test_missing import *  # noqa: F401
 
     try:
         import xmlrunner


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

Reply via email to