Skip to content

Commit

Permalink
Updated bokeh unit tests for bokeh 0.12.5
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Apr 6, 2017
1 parent 8f88243 commit 2a7aeb3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/testplotinstantiation.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ def test_batched_path_line_width_and_color(self):
self.assertEqual(plot.handles['source'].data['line_width'], line_width)
self.assertEqual(plot.handles['source'].data['color'], color)

def _test_hover_info(self, element, tooltips, line_policy='prev'):
def _test_hover_info(self, element, tooltips, line_policy='nearest'):
plot = bokeh_renderer.get_plot(element)
plot.initialize_plot()
fig = plot.state
Expand All @@ -461,7 +461,7 @@ def test_curve_overlay_hover_batched(self):
opts = {'Curve': {'tools': ['hover']},
'NdOverlay': {'legend_limit': 0}}
obj = obj(plot=opts)
self._test_hover_info(obj, [('Test', '@Test')])
self._test_hover_info(obj, [('Test', '@Test')], 'prev')

def test_curve_overlay_hover(self):
obj = NdOverlay({i: Curve(np.random.rand(10,2)) for i in range(5)},
Expand Down Expand Up @@ -532,12 +532,12 @@ def test_points_color_selection_nonselection(self):
vdims=['a', 'b'])(style=opts)
plot = bokeh_renderer.get_plot(points)
glyph_renderer = plot.handles['glyph_renderer']
self.assertEqual(glyph_renderer.glyph.fill_color, 'green')
self.assertEqual(glyph_renderer.glyph.line_color, 'green')
self.assertEqual(glyph_renderer.selection_glyph.fill_color, 'red')
self.assertEqual(glyph_renderer.selection_glyph.line_color, 'red')
self.assertEqual(glyph_renderer.nonselection_glyph.fill_color, 'blue')
self.assertEqual(glyph_renderer.nonselection_glyph.line_color, 'blue')
self.assertEqual(glyph_renderer.glyph.fill_color, '#008000')
self.assertEqual(glyph_renderer.glyph.line_color, '#008000')
self.assertEqual(glyph_renderer.selection_glyph.fill_color, '#FF0000')
self.assertEqual(glyph_renderer.selection_glyph.line_color, '#FF0000')
self.assertEqual(glyph_renderer.nonselection_glyph.fill_color, '#0000FF')
self.assertEqual(glyph_renderer.nonselection_glyph.line_color, '#0000FF')

def test_points_alpha_selection_nonselection(self):
opts = dict(alpha=0.8, selection_alpha=1.0, nonselection_alpha=0.2)
Expand Down

0 comments on commit 2a7aeb3

Please sign in to comment.