Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
n-elie committed May 16, 2024
1 parent c4fb513 commit ae4f028
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/test_scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ def test_scene_set_pixmap_visibility(qtbot, scene):
assert scene.pixmapVisibility() == True


def test_scene_show_hide_items(scene):
def test_scene_show_hide_items(qtbot, scene):
"""Check that nodes/edges can be hidden/shown."""

nodes = scene.nodes()
Expand Down Expand Up @@ -578,7 +578,7 @@ def test_scene_show_hide_items(scene):
assert edge.isVisible() == True


def test_scene_hide_selected_items(scene):
def test_scene_hide_selected_items(qtbot, scene):
"""Check that hideSelectedItems hide only selected items"""

scene.clearSelection()
Expand Down Expand Up @@ -980,7 +980,8 @@ def test_scene_visible_items_bounding_rect(scene):
"""Check that visibleItemsBoundingRect decrease/increase as new nodes are hidden/shown."""

bounding_rect = scene.visibleItemsBoundingRect()
assert bounding_rect.isNull()
assert not bounding_rect.isNull()

for node in scene.nodes():
node.hide()
new_bounding_rect = scene.visibleItemsBoundingRect()
Expand Down

0 comments on commit ae4f028

Please sign in to comment.