You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "itholic (via GitHub)" <gi...@apache.org> on 2023/05/23 00:27:51 UTC
[GitHub] [spark] itholic commented on a diff in pull request #41258: [SPARK-43603][PS][CONNECT][TEST] Rebalance `pyspark.pandas.DataFrame` Unit Tests
itholic commented on code in PR #41258:
URL: https://github.com/apache/spark/pull/41258#discussion_r1201344772
##########
python/pyspark/pandas/tests/test_dataframe_splits/split_s_x.py:
##########
@@ -0,0 +1,35 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+import unittest
+
+
+if __name__ == "__main__":
+ from pyspark.pandas.tests.test_dataframe import * # noqa: F401
+
+ try:
+ import xmlrunner
+
+ testRunner = xmlrunner.XMLTestRunner(output="target/test-reports", verbosity=2)
+ except ImportError:
+ testRunner = None
+
+ loader = unittest.loader.TestLoader()
+ loader.testNamePatterns = [
+ "pyspark.pandas.tests.test_dataframe.DataFrameTests.test_[stuvwxyz]*",
Review Comment:
Can we also include `y` and `z` here?
##########
dev/sparktestsupport/modules.py:
##########
@@ -715,8 +715,13 @@ def __hash__(self):
# unittests
"pyspark.pandas.tests.indexes.test_base",
"pyspark.pandas.tests.indexes.test_datetime",
- "pyspark.pandas.tests.test_dataframe",
- "pyspark.pandas.tests.test_dataframe_slow",
+ # "splits of pyspark.pandas.tests.test_dataframe",
+ "pyspark.pandas.tests.test_dataframe_splits.split_a_b",
+ "pyspark.pandas.tests.test_dataframe_splits.split_c",
+ "pyspark.pandas.tests.test_dataframe_splits.split_d_k",
+ "pyspark.pandas.tests.test_dataframe_splits.split_l_p",
+ "pyspark.pandas.tests.test_dataframe_splits.split_q_r",
+ "pyspark.pandas.tests.test_dataframe_splits.split_s_x",
Review Comment:
Just for extra clarifying, so I means that there is no test names started with `y` and `z`, right?
##########
python/pyspark/pandas/tests/test_dataframe.py:
##########
@@ -56,6 +66,14 @@ def df_pair(self):
psdf = ps.from_pandas(pdf)
return pdf, psdf
+ def test_validate_test_names(self):
+ # All test cases MUST be in pattern 'test_[a-z].*',
Review Comment:
What if the test name started with upper-case? e.g. `test_Aggregate` ? (Of course, this is also a basic violation of Python naming conventions)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org