def test_threadpolltext_force_update(minimal_conf_noscreen, manager_nospawn):
    """Check that widget can be polled instantly via command interface."""
    config = minimal_conf_noscreen
    tpoll = PollingWidget("Not polled")
    config.screens = [libqtile.config.Screen(top=libqtile.bar.Bar([tpoll], 10))]

    manager_nospawn.start(config)
    widget = manager_nospawn.c.widget["pollingwidget"]

    # Widget is polled immediately when configured
    assert widget.info()["text"] == "Poll count: 1"

    # Default update_interval is 600 seconds so the widget won't poll during test unless forced
    widget.force_update()
    assert widget.info()["text"] == "Poll count: 2"
Check that widget can be polled instantly via command interface.
test/widgets/test_base.py