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

gurwls223 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 6e3b9f74229e [SPARK-46503][PS][TESTS] Move `test_default_index` to 
`pyspark.pandas.tests.indexes.*`
6e3b9f74229e is described below

commit 6e3b9f74229ec953371cdfa3e40aee27e7bf1115
Author: Ruifeng Zheng <[email protected]>
AuthorDate: Tue Dec 26 09:29:42 2023 +0900

    [SPARK-46503][PS][TESTS] Move `test_default_index` to 
`pyspark.pandas.tests.indexes.*`
    
    ### What changes were proposed in this pull request?
    Move `test_default_index` to `pyspark.pandas.tests.indexes.*`
    
    ### Why are the changes needed?
    test code clean up
    
    ### Does this PR introduce _any_ user-facing change?
    no
    
    ### How was this patch tested?
    ci
    
    ### Was this patch authored or co-authored using generative AI tooling?
    no
    
    Closes #44482 from zhengruifeng/ps_test_idx_default.
    
    Authored-by: Ruifeng Zheng <[email protected]>
    Signed-off-by: Hyukjin Kwon <[email protected]>
---
 dev/sparktestsupport/modules.py                                   | 4 ++--
 .../test_parity_default.py}                                       | 8 +++++---
 .../tests/{test_default_index.py => indexes/test_default.py}      | 7 +++++--
 3 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/dev/sparktestsupport/modules.py b/dev/sparktestsupport/modules.py
index 6f41b6f0eddf..102d54875504 100644
--- a/dev/sparktestsupport/modules.py
+++ b/dev/sparktestsupport/modules.py
@@ -723,7 +723,7 @@ pyspark_pandas = Module(
         "pyspark.pandas.tests.plot.test_series_plot_plotly",
         "pyspark.pandas.tests.test_categorical",
         "pyspark.pandas.tests.test_config",
-        "pyspark.pandas.tests.test_default_index",
+        "pyspark.pandas.tests.indexes.test_default",
         "pyspark.pandas.tests.window.test_expanding",
         "pyspark.pandas.tests.window.test_expanding_adv",
         "pyspark.pandas.tests.window.test_expanding_error",
@@ -1049,7 +1049,7 @@ pyspark_pandas_connect_part0 = Module(
         "pyspark.pandas.tests.connect.plot.test_parity_series_plot_plotly",
         "pyspark.pandas.tests.connect.test_parity_categorical",
         "pyspark.pandas.tests.connect.test_parity_config",
-        "pyspark.pandas.tests.connect.test_parity_default_index",
+        "pyspark.pandas.tests.connect.indexes.test_parity_default",
         "pyspark.pandas.tests.connect.test_parity_extension",
         "pyspark.pandas.tests.connect.test_parity_frame_spark",
         "pyspark.pandas.tests.connect.test_parity_generic_functions",
diff --git a/python/pyspark/pandas/tests/connect/test_parity_default_index.py 
b/python/pyspark/pandas/tests/connect/indexes/test_parity_default.py
similarity index 85%
rename from python/pyspark/pandas/tests/connect/test_parity_default_index.py
rename to python/pyspark/pandas/tests/connect/indexes/test_parity_default.py
index a249fd7ef915..d6f0cadbf0cd 100644
--- a/python/pyspark/pandas/tests/connect/test_parity_default_index.py
+++ b/python/pyspark/pandas/tests/connect/indexes/test_parity_default.py
@@ -16,13 +16,15 @@
 #
 import unittest
 
-from pyspark.pandas.tests.test_default_index import DefaultIndexTestsMixin
+from pyspark.pandas.tests.indexes.test_default import DefaultIndexTestsMixin
 from pyspark.testing.connectutils import ReusedConnectTestCase
 from pyspark.testing.pandasutils import PandasOnSparkTestUtils
 
 
 class DefaultIndexParityTests(
-    DefaultIndexTestsMixin, PandasOnSparkTestUtils, ReusedConnectTestCase
+    DefaultIndexTestsMixin,
+    PandasOnSparkTestUtils,
+    ReusedConnectTestCase,
 ):
     @unittest.skip("Test depends on SparkContext which is not supported from 
Spark Connect.")
     def test_index_distributed_sequence_cleanup(self):
@@ -30,7 +32,7 @@ class DefaultIndexParityTests(
 
 
 if __name__ == "__main__":
-    from pyspark.pandas.tests.connect.test_parity_default_index import *  # 
noqa: F401
+    from pyspark.pandas.tests.connect.indexes.test_parity_default import *  # 
noqa: F401
 
     try:
         import xmlrunner  # type: ignore[import]
diff --git a/python/pyspark/pandas/tests/test_default_index.py 
b/python/pyspark/pandas/tests/indexes/test_default.py
similarity index 96%
rename from python/pyspark/pandas/tests/test_default_index.py
rename to python/pyspark/pandas/tests/indexes/test_default.py
index 29e489e81f3c..3d19eb407b42 100644
--- a/python/pyspark/pandas/tests/test_default_index.py
+++ b/python/pyspark/pandas/tests/indexes/test_default.py
@@ -91,13 +91,16 @@ class DefaultIndexTestsMixin:
                     )
 
 
-class DefaultIndexTests(DefaultIndexTestsMixin, PandasOnSparkTestCase):
+class DefaultIndexTests(
+    DefaultIndexTestsMixin,
+    PandasOnSparkTestCase,
+):
     pass
 
 
 if __name__ == "__main__":
     import unittest
-    from pyspark.pandas.tests.test_default_index import *  # noqa: F401
+    from pyspark.pandas.tests.indexes.test_default import *  # noqa: F401
 
     try:
         import xmlrunner


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

Reply via email to