Skip to content

Commit

Permalink
Additional test of post-removal registry status.
Browse files Browse the repository at this point in the history
  • Loading branch information
freakboy3742 committed Aug 16, 2023
1 parent b56afd6 commit 6731a4f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/tests/widgets/test_base.py
Expand Up @@ -640,7 +640,8 @@ def test_remove_child(widget):
assert child.parent == widget
assert child.app == app
assert child.window == window
assert app.widgets["child_id"] == child
assert app.widgets == {"widget_id": widget, "child_id": child}
assert window.widgets == {"widget_id": widget, "child_id": child}

# Remove the child
widget.remove(child)
Expand All @@ -653,6 +654,10 @@ def test_remove_child(widget):
assert child.app is None
assert child.window is None

# child widget no longer exists in the app or widgets registries.
assert app.widgets == {"widget_id": widget}
assert window.widgets == {"widget_id": widget}

# The impl's remove_child has been invoked
assert_action_performed_with(widget, "remove child", child=child._impl)

Expand Down

0 comments on commit 6731a4f

Please sign in to comment.