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 ebd5b007fcf2 [SPARK-55458][PYTHON][TESTS] Apply the new test pattern
for newly added tests
ebd5b007fcf2 is described below
commit ebd5b007fcf203eadcf8b037ab2b99577490f869
Author: Tian Gao <[email protected]>
AuthorDate: Tue Feb 10 15:38:23 2026 +0800
[SPARK-55458][PYTHON][TESTS] Apply the new test pattern for newly added
tests
### What changes were proposed in this pull request?
Applied the new `pyspark.testing.main` pattern to some newly added tests.
### Why are the changes needed?
Much less duplicated code. Also we are going to enforce some lint check for
all tests.
### 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 #54238 from gaogaotiantian/use-correct-test-pattern.
Authored-by: Tian Gao <[email protected]>
Signed-off-by: Ruifeng Zheng <[email protected]>
---
.../sql/tests/connect/client/test_client_call_stack_trace.py | 10 ++--------
python/pyspark/sql/tests/pandas/streaming/test_tws_tester.py | 10 ++--------
2 files changed, 4 insertions(+), 16 deletions(-)
diff --git
a/python/pyspark/sql/tests/connect/client/test_client_call_stack_trace.py
b/python/pyspark/sql/tests/connect/client/test_client_call_stack_trace.py
index cf5acb7ca88f..100ea58a88fe 100644
--- a/python/pyspark/sql/tests/connect/client/test_client_call_stack_trace.py
+++ b/python/pyspark/sql/tests/connect/client/test_client_call_stack_trace.py
@@ -307,12 +307,6 @@ class CallStackTraceIntegrationTestCase(unittest.TestCase):
if __name__ == "__main__":
- from pyspark.sql.tests.connect.client.test_client_call_stack_trace import
* # noqa: F401
+ from pyspark.testing import main
- try:
- import xmlrunner # type: ignore
-
- testRunner = xmlrunner.XMLTestRunner(output="target/test-reports",
verbosity=2)
- except ImportError:
- testRunner = None
- unittest.main(testRunner=testRunner, verbosity=2)
+ main()
diff --git a/python/pyspark/sql/tests/pandas/streaming/test_tws_tester.py
b/python/pyspark/sql/tests/pandas/streaming/test_tws_tester.py
index 11cb8115f5eb..3852804901a1 100644
--- a/python/pyspark/sql/tests/pandas/streaming/test_tws_tester.py
+++ b/python/pyspark/sql/tests/pandas/streaming/test_tws_tester.py
@@ -1148,12 +1148,6 @@ class TwsTesterFuzzTests(ReusedSQLTestCase):
if __name__ == "__main__":
- from pyspark.sql.tests.pandas.streaming.test_tws_tester import * # noqa:
F401
+ from pyspark.testing import main
- try:
- import xmlrunner
-
- testRunner = xmlrunner.XMLTestRunner(output="target/test-reports",
verbosity=2)
- except ImportError:
- testRunner = None
- unittest.main(testRunner=testRunner, verbosity=2)
+ main()
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]