MCPcopy
hub / github.com/qtile/qtile / assert_focused

Function assert_focused

test/layouts/layout_utils.py:4–7  ·  view source on GitHub ↗

Asserts that window with specified name is currently focused

(self, name)

Source from the content-addressed store, hash-verified

2
3
4def assert_focused(self, name):
5 """Asserts that window with specified name is currently focused"""
6 info = self.c.window.info()
7 assert info["name"] == name, "Got {!r}, expected {!r}".format(info["name"], name)
8
9
10def assert_unfocused(self, name):

Callers 15

test_promptFunction · 0.90
test_is_visible_hiddenFunction · 0.90
test_can_steal_focusFunction · 0.90
test_toggling_singleFunction · 0.90
test_togglingFunction · 0.90
test_focus_cycleFunction · 0.90
test_focus_lost_hideFunction · 0.90
test_killFunction · 0.90
test_floating_toggleFunction · 0.90

Calls 2

formatMethod · 0.80
infoMethod · 0.45

Tested by 15

test_promptFunction · 0.72
test_is_visible_hiddenFunction · 0.72
test_can_steal_focusFunction · 0.72
test_toggling_singleFunction · 0.72
test_togglingFunction · 0.72
test_focus_cycleFunction · 0.72
test_focus_lost_hideFunction · 0.72
test_killFunction · 0.72
test_floating_toggleFunction · 0.72