def assert_focus_path(self, *names):
    """
    Asserts that subsequent calls to next_window() focus the open windows in
    the given order (and prev_window() in the reverse order)
    """
    for i in names:
        self.c.group.next_window()
        assert_focused(self, i)
    # let's check twice for sure
    for i in names:
        self.c.group.next_window()
        assert_focused(self, i)
    # Ok, let's check backwards now
    for i in reversed(names):
        assert_focused(self, i)
        self.c.group.prev_window()
    # and twice for sure
    for i in reversed(names):
        assert_focused(self, i)
        self.c.group.prev_window()

    Asserts that subsequent calls to next_window() focus the open windows in
    the given order (and prev_window() in the reverse order)
    
test/layouts/layout_utils.py