MCPcopy
hub / github.com/qtile/qtile / test_can_steal_focus

Function test_can_steal_focus

test/test_window.py:353–370  ·  view source on GitHub ↗

Test Window.can_steal_focus.

(manager_nospawn)

Source from the content-addressed store, hash-verified

351
352@pytest.mark.usefixtures("hook_fixture")
353def test_can_steal_focus(manager_nospawn):
354 """
355 Test Window.can_steal_focus.
356 """
357
358 class AntiFocusStealConfig(BareConfig):
359 hook.subscribe.group_window_add(set_steal_focus)
360
361 manager_nospawn.start(AntiFocusStealConfig)
362 manager_nospawn.test_window("one")
363 assert_unfocused(manager_nospawn, "one")
364
365 manager_nospawn.test_window("two")
366 assert_unfocused(manager_nospawn, "one")
367 assert_unfocused(manager_nospawn, "two")
368
369 manager_nospawn.test_window("three")
370 assert_focused(manager_nospawn, "three")
371
372
373class FollowMuseFocus(ManagerConfig):

Callers

nothing calls this directly

Calls 4

assert_unfocusedFunction · 0.90
assert_focusedFunction · 0.90
test_windowMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected