def assert_unfocused(self, name):
    """Asserts that window with specified name is currently not focused"""
    try:
        info = self.c.window.info()
    except CommandError:
        # no current window, all unfocused
        return
    assert info["name"] != name, f"Got {name}, expected inequality."
Asserts that window with specified name is currently not focused
test/layouts/layout_utils.py