File: test_leaves.py

package info (click to toggle)
python-i3ipc 2.2.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 580 kB
  • sloc: python: 2,968; makefile: 222; sh: 4
file content (14 lines) | stat: -rw-r--r-- 398 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from ipctest import IpcTest


class TestLeaves(IpcTest):
    def test_workspace_leaves(self, i3):
        ws_name = self.fresh_workspace()
        con1 = self.open_window()
        i3.command('[id=%s] floating enable' % con1)
        self.open_window()
        self.open_window()

        ws = [w for w in i3.get_tree().workspaces() if w.name == ws_name][0]

        assert (len(ws.leaves()) == 3)