diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 4b204aa388..2f3ba4348d 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -215,7 +215,7 @@ jobs: # Ubuntu 20.04. See also SPARK-33162. - name: Install Python packages (Python 3.6) run: | - python3.6 -m pip install numpy 'pyarrow<3.0.0' pandas scipy xmlrunner + python3.6 -m pip install numpy 'pyarrow<3.0.0' pandas scipy xmlrunner plotly>=4.8 python3.6 -m pip list - name: Install Conda for pip packaging test run: | diff --git a/python/pyspark/pandas/tests/plot/test_frame_plot_plotly.py b/python/pyspark/pandas/tests/plot/test_frame_plot_plotly.py index f9811c4a01..3a50674292 100644 --- a/python/pyspark/pandas/tests/plot/test_frame_plot_plotly.py +++ b/python/pyspark/pandas/tests/plot/test_frame_plot_plotly.py @@ -37,10 +37,10 @@ if have_plotly: import plotly.graph_objs as go +@unittest.skipIf(not have_plotly, plotly_requirement_message) @unittest.skipIf( - not have_plotly or LooseVersion(pd.__version__) < "1.0.0", - plotly_requirement_message + " Or pandas<1.0; pandas<1.0 does not support latest plotly " - "and/or 'plotting.backend' option.", + LooseVersion(pd.__version__) < "1.0.0", + "pandas<1.0; pandas<1.0 does not support latest plotly and/or 'plotting.backend' option.", ) class DataFramePlotPlotlyTest(PandasOnSparkTestCase, TestUtils): @classmethod diff --git a/python/pyspark/pandas/tests/plot/test_series_plot_plotly.py b/python/pyspark/pandas/tests/plot/test_series_plot_plotly.py index b126da2afb..06ab277904 100644 --- a/python/pyspark/pandas/tests/plot/test_series_plot_plotly.py +++ b/python/pyspark/pandas/tests/plot/test_series_plot_plotly.py @@ -37,10 +37,10 @@ if have_plotly: import plotly.graph_objs as go +@unittest.skipIf(not have_plotly, plotly_requirement_message) @unittest.skipIf( - not have_plotly or LooseVersion(pd.__version__) < "1.0.0", - plotly_requirement_message + " Or pandas<1.0; pandas<1.0 does not support latest plotly " - "and/or 'plotting.backend' option.", + LooseVersion(pd.__version__) < "1.0.0", + "pandas<1.0; pandas<1.0 does not support latest plotly and/or 'plotting.backend' option.", ) class SeriesPlotPlotlyTest(PandasOnSparkTestCase, TestUtils): @classmethod