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 12c075c9d6cb [SPARK-46303][PS][TESTS] Remove unused code in
`pyspark.pandas.tests.series.* `
12c075c9d6cb is described below
commit 12c075c9d6cb254e31a003c554d8e2dbce0ef6a9
Author: Ruifeng Zheng <[email protected]>
AuthorDate: Thu Dec 7 16:56:54 2023 +0800
[SPARK-46303][PS][TESTS] Remove unused code in
`pyspark.pandas.tests.series.* `
### What changes were proposed in this pull request?
Remove unused code in `pyspark.pandas.tests.series.* `
### Why are the changes needed?
clean up the code
### 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 #44232 from zhengruifeng/ps_series_cleanup.
Authored-by: Ruifeng Zheng <[email protected]>
Signed-off-by: Ruifeng Zheng <[email protected]>
---
python/pyspark/pandas/tests/series/test_all_any.py | 8 --------
python/pyspark/pandas/tests/series/test_arg_ops.py | 8 --------
python/pyspark/pandas/tests/series/test_as_of.py | 8 --------
python/pyspark/pandas/tests/series/test_as_type.py | 8 --------
python/pyspark/pandas/tests/series/test_compute.py | 8 --------
python/pyspark/pandas/tests/series/test_cumulative.py | 8 --------
python/pyspark/pandas/tests/series/test_index.py | 8 --------
python/pyspark/pandas/tests/series/test_missing_data.py | 8 --------
python/pyspark/pandas/tests/series/test_sort.py | 8 --------
python/pyspark/pandas/tests/series/test_stat.py | 8 --------
10 files changed, 80 deletions(-)
diff --git a/python/pyspark/pandas/tests/series/test_all_any.py
b/python/pyspark/pandas/tests/series/test_all_any.py
index 6663675c6b9b..52ef5a26f4df 100644
--- a/python/pyspark/pandas/tests/series/test_all_any.py
+++ b/python/pyspark/pandas/tests/series/test_all_any.py
@@ -25,14 +25,6 @@ from pyspark.testing.sqlutils import SQLTestUtils
class SeriesAllAnyMixin:
- @property
- def pser(self):
- return pd.Series([1, 2, 3, 4, 5, 6, 7], name="x")
-
- @property
- def psser(self):
- return ps.from_pandas(self.pser)
-
def test_all(self):
for pser in [
pd.Series([True, True], name="x"),
diff --git a/python/pyspark/pandas/tests/series/test_arg_ops.py
b/python/pyspark/pandas/tests/series/test_arg_ops.py
index 5b1aa246246a..134296462c1b 100644
--- a/python/pyspark/pandas/tests/series/test_arg_ops.py
+++ b/python/pyspark/pandas/tests/series/test_arg_ops.py
@@ -25,14 +25,6 @@ from pyspark.testing.sqlutils import SQLTestUtils
class SeriesArgOpsMixin:
- @property
- def pser(self):
- return pd.Series([1, 2, 3, 4, 5, 6, 7], name="x")
-
- @property
- def psser(self):
- return ps.from_pandas(self.pser)
-
def test_argsort(self):
# Without null values
pser = pd.Series([0, -100, 50, 100, 20], index=["A", "B", "C", "D",
"E"])
diff --git a/python/pyspark/pandas/tests/series/test_as_of.py
b/python/pyspark/pandas/tests/series/test_as_of.py
index 552176ad656d..ad3e2522b652 100644
--- a/python/pyspark/pandas/tests/series/test_as_of.py
+++ b/python/pyspark/pandas/tests/series/test_as_of.py
@@ -25,14 +25,6 @@ from pyspark.testing.sqlutils import SQLTestUtils
class SeriesAsOfMixin:
- @property
- def pser(self):
- return pd.Series([1, 2, 3, 4, 5, 6, 7], name="x")
-
- @property
- def psser(self):
- return ps.from_pandas(self.pser)
-
def test_asof(self):
pser = pd.Series([1, 2, np.nan, 4], index=[10, 20, 30, 40],
name="Koalas")
psser = ps.from_pandas(pser)
diff --git a/python/pyspark/pandas/tests/series/test_as_type.py
b/python/pyspark/pandas/tests/series/test_as_type.py
index 2f66d19d63fc..70352c34879f 100644
--- a/python/pyspark/pandas/tests/series/test_as_type.py
+++ b/python/pyspark/pandas/tests/series/test_as_type.py
@@ -30,14 +30,6 @@ from pyspark.pandas.typedef.typehints import (
class SeriesAsTypeMixin:
- @property
- def pser(self):
- return pd.Series([1, 2, 3, 4, 5, 6, 7], name="x")
-
- @property
- def psser(self):
- return ps.from_pandas(self.pser)
-
def test_astype(self):
psers = [pd.Series([10, 20, 15, 30, 45], name="x")]
diff --git a/python/pyspark/pandas/tests/series/test_compute.py
b/python/pyspark/pandas/tests/series/test_compute.py
index 9e48de893a13..05cd42fe4ed1 100644
--- a/python/pyspark/pandas/tests/series/test_compute.py
+++ b/python/pyspark/pandas/tests/series/test_compute.py
@@ -27,14 +27,6 @@ from pyspark.testing.sqlutils import SQLTestUtils
class SeriesComputeMixin:
- @property
- def pser(self):
- return pd.Series([1, 2, 3, 4, 5, 6, 7], name="x")
-
- @property
- def psser(self):
- return ps.from_pandas(self.pser)
-
def test_duplicated(self):
for pser in [
pd.Series(["beetle", None, "beetle", None, "lama", "beetle"],
name="objects"),
diff --git a/python/pyspark/pandas/tests/series/test_cumulative.py
b/python/pyspark/pandas/tests/series/test_cumulative.py
index ef58223171ee..ee85b2f7d00a 100644
--- a/python/pyspark/pandas/tests/series/test_cumulative.py
+++ b/python/pyspark/pandas/tests/series/test_cumulative.py
@@ -24,14 +24,6 @@ from pyspark.testing.sqlutils import SQLTestUtils
class SeriesCumulativeMixin:
- @property
- def pser(self):
- return pd.Series([1, 2, 3, 4, 5, 6, 7], name="x")
-
- @property
- def psser(self):
- return ps.from_pandas(self.pser)
-
def test_cummin(self):
pser = pd.Series([1.0, None, 0.0, 4.0, 9.0])
psser = ps.from_pandas(pser)
diff --git a/python/pyspark/pandas/tests/series/test_index.py
b/python/pyspark/pandas/tests/series/test_index.py
index 31b85b6d8dcc..6f3f98c56f4c 100644
--- a/python/pyspark/pandas/tests/series/test_index.py
+++ b/python/pyspark/pandas/tests/series/test_index.py
@@ -25,14 +25,6 @@ from pyspark.testing.sqlutils import SQLTestUtils
class SeriesIndexMixin:
- @property
- def pser(self):
- return pd.Series([1, 2, 3, 4, 5, 6, 7], name="x")
-
- @property
- def psser(self):
- return ps.from_pandas(self.pser)
-
def test_align(self):
pdf = pd.DataFrame({"a": [1, 2, 3], "b": ["a", "b", "c"]})
psdf = ps.from_pandas(pdf)
diff --git a/python/pyspark/pandas/tests/series/test_missing_data.py
b/python/pyspark/pandas/tests/series/test_missing_data.py
index e45f259e8fb5..5d08c9a56eb6 100644
--- a/python/pyspark/pandas/tests/series/test_missing_data.py
+++ b/python/pyspark/pandas/tests/series/test_missing_data.py
@@ -25,14 +25,6 @@ from pyspark.testing.sqlutils import SQLTestUtils
class SeriesMissingDataMixin:
- @property
- def pser(self):
- return pd.Series([1, 2, 3, 4, 5, 6, 7], name="x")
-
- @property
- def psser(self):
- return ps.from_pandas(self.pser)
-
def test_fillna(self):
pdf = pd.DataFrame({"x": [np.nan, 2, 3, 4, np.nan, 6], "y": [np.nan,
2, 3, 4, np.nan, 6]})
psdf = ps.from_pandas(pdf)
diff --git a/python/pyspark/pandas/tests/series/test_sort.py
b/python/pyspark/pandas/tests/series/test_sort.py
index a3772bba8237..a0b724a149b6 100644
--- a/python/pyspark/pandas/tests/series/test_sort.py
+++ b/python/pyspark/pandas/tests/series/test_sort.py
@@ -25,14 +25,6 @@ from pyspark.testing.sqlutils import SQLTestUtils
class SeriesSortMixin:
- @property
- def pser(self):
- return pd.Series([1, 2, 3, 4, 5, 6, 7], name="x")
-
- @property
- def psser(self):
- return ps.from_pandas(self.pser)
-
def test_sort_values(self):
pdf = pd.DataFrame({"x": [1, 2, 3, 4, 5, None, 7]},
index=np.random.rand(7))
psdf = ps.from_pandas(pdf)
diff --git a/python/pyspark/pandas/tests/series/test_stat.py
b/python/pyspark/pandas/tests/series/test_stat.py
index 1e379d32d569..b2f98544ba10 100644
--- a/python/pyspark/pandas/tests/series/test_stat.py
+++ b/python/pyspark/pandas/tests/series/test_stat.py
@@ -26,14 +26,6 @@ from pyspark.testing.sqlutils import SQLTestUtils
class SeriesStatMixin:
- @property
- def pser(self):
- return pd.Series([1, 2, 3, 4, 5, 6, 7], name="x")
-
- @property
- def psser(self):
- return ps.from_pandas(self.pser)
-
def test_nunique(self):
pser = pd.Series([1, 2, 1, np.nan])
psser = ps.from_pandas(pser)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]