def assert_focused(self, name):
    """Asserts that window with specified name is currently focused"""
    info = self.c.window.info()
    assert info["name"] == name, "Got {!r}, expected {!r}".format(info["name"], name)
Asserts that window with specified name is currently focused
test/layouts/layout_utils.py