def test_unregister(manager_nospawn, minimal_conf_noscreen):
    """Short test to check if notifier deregisters correctly."""

    def notifier_has_callbacks():
        _, out = manager_nospawn.c.widget["notify"].eval("notifier.callbacks")
        return out != "[]"

    widget = notify.Notify()
    config = minimal_conf_noscreen
    config.screens = [libqtile.config.Screen(top=Bar([widget], 10))]
    manager_nospawn.start(config)

    assert notifier_has_callbacks()

    _ = manager_nospawn.c.widget["notify"].eval("self.finalize()")

    assert not notifier_has_callbacks()
Short test to check if notifier deregisters correctly.
test/widgets/test_notify.py