def test_remove(self, qtile):
     a = qtile.testWindow('a')
     b = qtile.testWindow('b')
     assert tree(qtile) == ['a', 'b']
     qtile.kill_window(a)
     assert tree(qtile) == ['b']
     qtile.kill_window(b)
     assert tree(qtile) == []
def grid(qtile):
    qtile.testWindow('a')
    qtile.testWindow('b')
    qtile.c.layout.previous()
    qtile.c.layout.mode_vertical()
    qtile.testWindow('c')
    qtile.c.layout.right()
    qtile.c.layout.mode_vertical()
    qtile.testWindow('d')
 def test_split_directions(self, qtile):
     qtile.testWindow('a')
     qtile.c.layout.mode_horizontal()
     qtile.testWindow('b')
     qtile.c.layout.mode_vertical()
     qtile.testWindow('c')
     assert tree(qtile) == ['a', ['b', 'c']]
 def test_sizes(self, qtile):
     qtile.testWindow('a')
     qtile.testWindow('b')
     qtile.c.layout.mode_vertical()
     qtile.testWindow('c')
     info = qtile.c.window.info()
     assert info['x'] == 400
     assert info['y'] == 300
     assert info['width'] == 400 - 2
     assert info['height'] == 300 - 2
     qtile.c.layout.grow_height(50)
     info = qtile.c.window.info()
     assert info['height'] == 300 - 2 + 50
     qtile.c.layout.grow_width(50)
     info = qtile.c.window.info()
     assert info['width'] == 400 - 2 + 50
     qtile.c.layout.reset_size()
     info = qtile.c.window.info()
     assert info['height'] == 300 - 2
     qtile.c.layout.height(300)
     info = qtile.c.window.info()
     assert info['height'] == 300 - 2
     qtile.c.layout.width(250)
     info = qtile.c.window.info()
     assert info['width'] == 250 - 2
     qtile.c.layout.size(200)
     info = qtile.c.window.info()
     assert info['height'] == 200 - 2
     qtile.c.layout.grow(10)
     info = qtile.c.window.info()
     assert info['height'] == 210 - 2
 def test_recent(self, qtile):
     qtile.testWindow('a')
     qtile.testWindow('b')
     qtile.testWindow('c')
     assertFocused(qtile, 'c')
     qtile.c.layout.recent()
     assertFocused(qtile, 'b')
     qtile.c.layout.recent()
     assertFocused(qtile, 'c')
     qtile.c.layout.next()
     assertFocused(qtile, 'a')
     qtile.c.layout.recent()
     assertFocused(qtile, 'c')
 def test_windows(self, qtile):
     qtile.testWindow('a')
     qtile.testWindow('b')
     qtile.testWindow('c')
     assertFocused(qtile, 'c')
     assert tree(qtile) == ['a', 'b', 'c']
 def test_info(self, qtile):
     qtile.testWindow('a')
     qtile.testWindow('b')
     assert qtile.c.layout.info()['tree'] == ['a', 'b']
 def test_split_mode(self, qtile):
     qtile.testWindow('a')
     qtile.testWindow('b')
     qtile.c.layout.mode_horizontal_split()
     qtile.testWindow('c')
     assert qtile.c.window.info()['width'] == 200 - 2
     qtile.c.layout.mode_vertical()
     qtile.testWindow('d')
     assert qtile.c.window.info()['height'] == 300 - 2
     qtile.testWindow('e')
     assert qtile.c.window.info()['height'] == 200 - 2
     qtile.c.layout.mode_vertical_split()
     qtile.testWindow('f')
     assert qtile.c.window.info()['height'] == 100 - 2