Skip to content

Commit 520c323

Browse files
committed
Update failing test
1 parent 086de32 commit 520c323

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

holoviews/tests/plotting/bokeh/test_heatmapplot.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import numpy as np
22
import pandas as pd
3-
from bokeh.models import FactorRange, HoverTool, Range1d
3+
from bokeh.models import FactorRange, HoverTool, Image as bkImage, Range1d
44

55
from holoviews.element import HeatMap, Image, Points
66

@@ -97,10 +97,15 @@ def test_heatmap_invert_axes(self):
9797
arr = np.array([[0, 1, 2], [3, 4, 5]])
9898
hm = HeatMap(Image(arr)).opts(invert_axes=True)
9999
plot = bokeh_renderer.get_plot(hm)
100-
source = plot.handles['source']
101-
self.assertEqual(source.data['zvalues'], hm.dimension_values(2, flat=False).T.flatten())
102-
self.assertEqual(source.data['x'], hm.dimension_values(1))
103-
self.assertEqual(source.data['y'], hm.dimension_values(0))
100+
assert plot._is_contiguous_gridded is True
101+
assert isinstance(plot.handles["glyph"], bkImage)
102+
103+
data = plot.handles['source'].data
104+
np.testing.assert_equal(data['image'][0], hm.dimension_values(2, flat=False).T)
105+
assert data["x"] == [-0.5]
106+
assert data["y"] == [-0.5]
107+
assert data["dw"] == [1]
108+
assert data["dh"] == [1]
104109

105110
def test_heatmap_dilate(self):
106111
hmap = HeatMap([('A',1, 1), ('B', 2, 2)]).opts(dilate=True)

0 commit comments

Comments
 (0)