Skip to content

Commit ec851b7

Browse files
authored
test: Fix failing Plotly (6.5.0) test (#6740)
1 parent 0ca9f84 commit ec851b7

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

holoviews/tests/plotting/plotly/test_barplot.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import pandas as pd
33

44
from holoviews.element import Bars
5+
from holoviews.plotting.plotly.util import PLOTLY_VERSION
56

67
from .test_plot import TestPlotlyPlot
78

@@ -109,7 +110,8 @@ def test_bars_continuous_datetime(self):
109110
y = np.random.rand(10)
110111
bars = Bars((pd.date_range("1/1/2000", periods=10), y))
111112
plot = self._get_plot_state(bars)
112-
np.testing.assert_equal(plot['data'][0]['x'], pd.date_range("1/1/2000", periods=10).values.astype(float))
113+
dtype = "datetime64[us]" if PLOTLY_VERSION >= (6, 5, 0) else float
114+
np.testing.assert_equal(plot['data'][0]['x'], pd.date_range("1/1/2000", periods=10).values.astype(dtype))
113115
np.testing.assert_equal(plot['data'][0]['y'], y)
114116

115117
def test_bars_not_continuous_data_list(self):

0 commit comments

Comments
 (0)