Beispiel #1
0
def test_focus_cycle(manager):
    manager.test_window("one")
    manager.test_window("two")
    manager.test_window("float1", floating=True)
    manager.test_window("float2", floating=True)
    manager.test_window("three")

    # Test preconditions (the order of items in 'clients' is managed by each layout)
    assert set(manager.c.layout.info()['clients']) == {'one', 'two', 'three'}
    assert_focused(manager, "three")

    # Assert that the layout cycles the focus on all windows
    assert_focus_path_unordered(manager, 'float1', 'float2', 'one', 'two', 'three')
Beispiel #2
0
def test_focus_cycle(qtile):
    pytest.importorskip("tkinter")

    qtile.test_window("one")
    qtile.test_window("two")
    qtile.test_dialog("float1")
    qtile.test_dialog("float2")
    qtile.test_window("three")

    # Test preconditions (the order of items in 'clients' is managed by each layout)
    assert set(qtile.c.layout.info()['clients']) == {'one', 'two', 'three'}
    assert_focused(qtile, "three")

    # Assert that the layout cycles the focus on all windows
    assert_focus_path_unordered(qtile, 'float1', 'float2', 'one', 'two',
                                'three')