def test_openweather_parse(
    patch_openweather, minimal_conf_noscreen, manager_nospawn, params, expected
):
    """Check widget parses output correctly for display."""
    config = minimal_conf_noscreen
    config.screens = [
        libqtile.config.Screen(top=Bar([patch_openweather.OpenWeather(**params)], 10))
    ]
    manager_nospawn.start(config)
    manager_nospawn.c.widget["openweather"].eval("self.update(self.poll())")
    info = manager_nospawn.c.widget["openweather"].info()["text"]
    assert info == expected
Check widget parses output correctly for display.
test/widgets/test_openweather.py