Skip to content

Commit

Permalink
try render ColormapEdit
Browse files Browse the repository at this point in the history
  • Loading branch information
Czaki committed Dec 8, 2023
1 parent bae1c06 commit 23a9f78
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion package/tests/test_PartSeg/test_colormap_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ def test_color_conversion():


class TestColormapEdit:
def test_click(self, qtbot: QtBot):
def test_click(self, qtbot: QtBot, qapp):
widget = ColormapEdit()
widget.show()
qtbot.addWidget(widget)
width = widget.width() - 20
with qtbot.waitSignal(widget.double_clicked):
Expand All @@ -47,6 +48,8 @@ def test_click(self, qtbot: QtBot):
with qtbot.assertNotEmitted(widget.double_clicked):
qtbot.mouseDClick(widget, Qt.LeftButton, pos=QPoint(30, widget.height() // 2))
assert len(widget.colormap.colors) == 3
qapp.processEvents()
widget.hide()

def test_distribute_evenly(self, qtbot: QtBot):
widget = ColormapEdit()
Expand Down

0 comments on commit 23a9f78

Please sign in to comment.