Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro committed May 1, 2023
1 parent 5778e2a commit 054526d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions holoviews/tests/plotting/bokeh/test_callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def test_box_edit_callback(self):
self.assertEqual(source.data['bottom'], [-0.5])
self.assertEqual(source.data['right'], [0.5])
self.assertEqual(source.data['top'], [0.5])
data = {'x': [0, 1], 'y': [0, 1], 'width': [0.5, 2], 'height': [2, 0.5]}
data = {'left': [-0.25, 0], 'bottom': [-1, 0.75], 'right': [0.25, 2], 'top': [1, 1.25]}
callback.on_msg({'data': data})
element = Rectangles([(-0.25, -1, 0.25, 1), (0, 0.75, 2, 1.25)])
self.assertEqual(box_edit.element, element)
Expand All @@ -272,11 +272,11 @@ def test_box_edit_callback_legacy(self):
self.assertIsInstance(plot.callbacks[0], BoxEditCallback)
callback = plot.callbacks[0]
source = plot.handles['cds']
self.assertEqual(source.data['x'], [0])
self.assertEqual(source.data['y'], [0])
self.assertEqual(source.data['width'], [1])
self.assertEqual(source.data['height'], [1])
data = {'x': [0, 1], 'y': [0, 1], 'width': [0.5, 2], 'height': [2, 0.5]}
self.assertEqual(source.data['left'], [-0.5])
self.assertEqual(source.data['bottom'], [-0.5])
self.assertEqual(source.data['right'], [0.5])
self.assertEqual(source.data['top'], [0.5])
data = {'left': [-0.25, 0], 'bottom': [-1, 0.75], 'right': [0.25, 2], 'top': [1, 1.25]}
callback.on_msg({'data': data})
element = Polygons([Box(0, 0, (0.5, 2)), Box(1, 1, (2, 0.5))])
self.assertEqual(box_edit.element, element)
Expand Down

0 comments on commit 054526d

Please sign in to comment.