Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
hainm committed Mar 3, 2024
1 parent 91d5003 commit 46c9e84
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions nglview/tests/test_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,29 +238,29 @@ class DummWidget():
[view])['methodName'] == 'setSyncCamera'

msg = dict(type='request_frame', data=dict())
view._handle_custom_msg(msg=msg, buffers=[])
view._handle_nglview_custom_msg(None, msg=msg, buffers=[])
msg = dict(type='repr_parameters', data=dict(name='hello'))
view._handle_custom_msg(msg=msg, buffers=[])
view._handle_nglview_custom_msg(None, msg=msg, buffers=[])
view.loaded = True
msg = dict(type='request_loaded', data=True)
view._handle_custom_msg(msg=msg, buffers=[])
view._handle_nglview_custom_msg(None, msg=msg, buffers=[])
view.loaded = False
msg = dict(type='request_loaded', data=True)
view._handle_custom_msg(msg=msg, buffers=[])
view._handle_nglview_custom_msg(None, msg=msg, buffers=[])
msg = dict(type='all_reprs_info', data=REPR_DICT)
view._handle_custom_msg(msg=msg, buffers=[])
view._handle_nglview_custom_msg(None, msg=msg, buffers=[])
msg = dict(type='stage_parameters', data=dict())
view._handle_custom_msg(msg=msg, buffers=[])
view._handle_nglview_custom_msg(None, msg=msg, buffers=[])
# test negative frame (it will be set to self.count - 1)
view.frame = -1
msg = dict(type='request_frame', data=dict())
# async_message
msg = {'type': 'async_message', 'data': 'ok'}
view._handle_custom_msg(msg, [])
view._handle_nglview_custom_msg(None, msg, [])
# render_image
r = view.render_image()
msg = {'type': 'image_data', 'ID': r.model_id, 'data': b'YmxhIGJsYQ=='}
view._handle_custom_msg(msg, [])
view._handle_nglview_custom_msg(None, msg, [])
view.loaded = True
view.show_only([
0,
Expand Down

0 comments on commit 46c9e84

Please sign in to comment.