Skip to content

Commit

Permalink
test: try activation
Browse files Browse the repository at this point in the history
  • Loading branch information
kmnhan committed Nov 3, 2024
1 parent 34d0e46 commit 18f3030
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/interactive/test_imagetool.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,11 @@ def test_value_update(qtbot):

def test_value_update_errors(qtbot):
win = ImageTool(xr.DataArray(np.arange(25).reshape((5, 5)), dims=["x", "y"]))
qtbot.addWidget(win)

with qtbot.waitExposed(win):
win.show()
win.activateWindow()

with pytest.raises(ValueError, match="DataArray dimensions do not match"):
win.slicer_area.update_values(
Expand All @@ -420,6 +425,8 @@ def test_value_update_errors(qtbot):
with pytest.raises(ValueError, match="^Data shape does not match.*"):
win.slicer_area.update_values(np.arange(24).reshape((4, 6)))

win.close()


def test_sync(qtbot):
manager = ImageToolManager()
Expand Down

0 comments on commit 18f3030

Please sign in to comment.