[SPARK-40210][PYTHON][FOLLOW-UP][TEST] Speed up new tests using one action instead of many
[SPARK-40210][PYTHON][FOLLOW-UP][TEST] Speed up new tests using one action instead of many

### What changes were proposed in this pull request?
This is follow up PR for https://github.com/apache/spark/pull/37748 to improve and speed tests as suggested by zero323

### Why are the changes needed?

Improve test cases

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Existing unit tests

Closes #37774 from khalidmammadov/speed_up_math_test.

Authored-by: Khalid Mammadov <16da34b68a005cb90eeefd58c8a727f48828b7a4@gmail.com>
Signed-off-by: zero323 <0f81822ec43dc7f424811d0a422871ea124aa3dd@gmail.com>

vinodkc/spark,apache/spark,apache/spark,hvanhovell/spark,gengliangwang/spark,mahak/spark,vinodkc/spark,witgo/spark,wangyum/spark,srowen/spark,vinodkc/spark,vinodkc/spark,gengliangwang/spark,srowen/spark,witgo/spark,zzcclp/spark,ueshin/apache-spark,shaneknapp/spark,witgo/spark,HyukjinKwon/spark,holdenk/spark,zzcclp/spark,HyukjinKwon/spark,hvanhovell/spark,holdenk/spark,wangyum/spark,HyukjinKwon/spark,dongjoon-hyun/spark,srowen/spark,hvanhovell/spark,mahak/spark,witgo/spark,witgo/spark,holdenk/spark,ueshin/apache-spark,dongjoon-hyun/spark,ueshin/apache-spark,vinodkc/spark,zzcclp/spark,shaneknapp/spark,shaneknapp/spark,zzcclp/spark,witgo/spark,shaneknapp/spark,HyukjinKwon/spark,hvanhovell/spark,mahak/spark,apache/spark,hvanhovell/spark,ueshin/apache-spark,hvanhovell/spark,mahak/spark,gengliangwang/spark,wangyum/spark,srowen/spark,apache/spark,zzcclp/spark,shaneknapp/spark,HyukjinKwon/spark,wangyum/spark,HyukjinKwon/spark,dongjoon-hyun/spark,holdenk/spark,wangyum/spark,witgo/spark,dongjoon-hyun/spark,gengliangwang/spark,hvanhovell/spark,vinodkc/spark,dongjoon-hyun/spark,wangyum/spark,shaneknapp/spark,wangyum/spark,zzcclp/spark,shaneknapp/spark,holdenk/spark,HyukjinKwon/spark,gengliangwang/spark,apache/spark,zzcclp/spark,holdenk/spark,apache/spark,holdenk/spark,srowen/spark,mahak/spark,gengliangwang/spark,apache/spark,mahak/spark,gengliangwang/spark,dongjoon-hyun/spark,vinodkc/spark,ueshin/apache-spark,mahak/spark,ueshin/apache-spark,srowen/spark,srowen/spark,ueshin/apache-spark,dongjoon-hyun/spark