This is an automated email from the ASF dual-hosted git repository. dongjoon 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 be998221fc93 [SPARK-48056][PYTHON][CONNECT][FOLLOW-UP] Use `assertEqual` instead of `assertEquals` for Python 3.12 be998221fc93 is described below commit be998221fc934ba7de9b6233f315f3f59bbc8435 Author: Dongjoon Hyun <dh...@apple.com> AuthorDate: Fri May 3 20:47:02 2024 -0700 [SPARK-48056][PYTHON][CONNECT][FOLLOW-UP] Use `assertEqual` instead of `assertEquals` for Python 3.12 ### What changes were proposed in this pull request? This is a follow-up of - #46297 This PR aims to use `assertEqual` instead of `assertEquals` for Python 3.12. ### Why are the changes needed? To recover Python CI, - https://github.com/apache/spark/actions/workflows/build_python.yml From Python 3.12, `assertEquals` doesn't exist. https://docs.python.org/3/library/unittest.html#assert-methods ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass the CIs. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #46377 from dongjoon-hyun/SPARK-48056. Authored-by: Dongjoon Hyun <dh...@apple.com> Signed-off-by: Dongjoon Hyun <dh...@apple.com> --- python/pyspark/sql/tests/connect/client/test_client.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/python/pyspark/sql/tests/connect/client/test_client.py b/python/pyspark/sql/tests/connect/client/test_client.py index 4f54a0a67d8a..196c9eb5d81d 100644 --- a/python/pyspark/sql/tests/connect/client/test_client.py +++ b/python/pyspark/sql/tests/connect/client/test_client.py @@ -372,10 +372,10 @@ class SparkConnectClientReattachTestCase(unittest.TestCase): pass def checks(): - self.assertEquals(2, stub.execute_calls) - self.assertEquals(0, stub.attach_calls) - self.assertEquals(0, stub.release_calls) - self.assertEquals(0, stub.release_until_calls) + self.assertEqual(2, stub.execute_calls) + self.assertEqual(0, stub.attach_calls) + self.assertEqual(0, stub.release_calls) + self.assertEqual(0, stub.release_until_calls) eventually(timeout=1, catch_assertions=True)(checks)() @@ -406,10 +406,10 @@ class SparkConnectClientReattachTestCase(unittest.TestCase): self.assertTrue("RESPONSE_ALREADY_RECEIVED" in e.exception.getMessage()) def checks(): - self.assertEquals(1, stub.execute_calls) - self.assertEquals(1, stub.attach_calls) - self.assertEquals(0, stub.release_calls) - self.assertEquals(0, stub.release_until_calls) + self.assertEqual(1, stub.execute_calls) + self.assertEqual(1, stub.attach_calls) + self.assertEqual(0, stub.release_calls) + self.assertEqual(0, stub.release_until_calls) eventually(timeout=1, catch_assertions=True)(checks)() --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org