Skip to content

Commit 551ddc2

Browse files
committed
update unit tests
1 parent 9669e63 commit 551ddc2

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

‎tests/unit/vtk/scene/test_base.py‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1489,7 +1489,7 @@ def test_sync_camera_projects_the_camera_onto_the_pipeline(scene):
14891489
camera.SetParallelScale.assert_called_once_with(GESTURE_PARALLEL_SCALE)
14901490

14911491

1492-
def test_sync_camera_serializes_after_the_write_with_the_render_window_id(scene):
1492+
def test_sync_camera_serializes_after_the_write_with_the_active_camera_id(scene):
14931493
"""The re-serialisation follows the write, and carries production's id.
14941494
14951495
This is the assertion that pins the increment. Reverted -- the write kept
@@ -1499,9 +1499,9 @@ def test_sync_camera_serializes_after_the_write_with_the_render_window_id(scene)
14991499
a refresh snap back to the framing they moved away from.
15001500
15011501
The spy appends ``"camera"`` for the write and the two-tuple
1502-
``("serialize", <ids>)`` for the re-serialisation; the tuple is the
1503-
recording format, not the argument. ``<ids>`` is asserted as the list
1504-
production passes, since ``UpdateStatesFromObjects`` takes a sequence.
1502+
``("serialize", <id>)`` for the re-serialization; the tuple is the
1503+
recording format, not the argument. ``<id>`` is asserted as the bare id
1504+
production passes, since ``UpdateStateFromObject`` takes a single id.
15051505
"""
15061506
order = []
15071507
real_sync = scene._renderer.sync_camera
@@ -1511,13 +1511,13 @@ def _sync(camera_state):
15111511
return real_sync(camera_state)
15121512

15131513
scene._renderer.sync_camera = _sync
1514-
scene._renderer._object_manager.UpdateStatesFromObjects = (
1515-
lambda ids: order.append(("serialize", ids))
1514+
scene._renderer._object_manager.UpdateStateFromObject = (
1515+
lambda object_id: order.append(("serialize", object_id))
15161516
)
15171517

15181518
scene.sync_camera(_gesture_camera())
15191519

1520-
assert order == ["camera", ("serialize", [RENDER_WINDOW_WASM_ID])]
1520+
assert order == ["camera", ("serialize", ACTIVE_CAMERA_WASM_ID)]
15211521

15221522

15231523
def test_sync_camera_holds_the_lock_across_both_halves(scene):
@@ -1540,8 +1540,8 @@ def _sync(camera_state):
15401540
return real_sync(camera_state)
15411541

15421542
scene._renderer.sync_camera = _sync
1543-
scene._renderer._object_manager.UpdateStatesFromObjects = (
1544-
lambda ids: observed.update(serialize_depth=scene._vtk_lock.depth)
1543+
scene._renderer._object_manager.UpdateStateFromObject = (
1544+
lambda object_id: observed.update(serialize_depth=scene._vtk_lock.depth)
15451545
)
15461546

15471547
scene.sync_camera(_gesture_camera())

0 commit comments

Comments
 (0)