Skip to content

Commit

Permalink
test: add limit sync tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kmnhan committed Feb 8, 2025
1 parent 8f8648c commit 4c039a2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/interactive/test_imagetool_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,14 @@ def test_manager_sync(qtbot, move_and_compare_values, test_data) -> None:

move_and_compare_values(qtbot, win0, [9.0, 8.0, 3.0, 4.0], target_win=win1)

# Change limits
win0.slicer_area.main_image.getViewBox().setRange(xRange=[2, 3], yRange=[1, 2])
# Trigger manual range propagation
win0.slicer_area.main_image.getViewBox().sigRangeChangedManually.emit(
win0.slicer_area.main_image.getViewBox().state["mouseEnabled"][:]
)
assert win1.slicer_area.main_image.getViewBox().viewRange() == [[2, 3], [1, 2]]

manager.remove_tool(0)
manager.remove_tool(1)
manager.close()
Expand Down

0 comments on commit 4c039a2

Please sign in to comment.