Tighten up relase and reclaim clode for terminals.
This commit is contained in:
@@ -153,6 +153,26 @@ class I3WorkspaceBackendRegressionTests(unittest.TestCase):
|
||||
],
|
||||
)
|
||||
|
||||
def test_public_refresh_emits_updated_context_without_transition(self) -> None:
|
||||
backend = compositor_state_i3.I3WorkspaceBackend(i3ipc_module=types.SimpleNamespace())
|
||||
backend._active = True
|
||||
backend._emitSignal = mock.Mock()
|
||||
payload = {
|
||||
"focused_window_id": 0x2600003,
|
||||
"focused_window_title": "Browser",
|
||||
"focused_workspace_empty": False,
|
||||
}
|
||||
|
||||
with mock.patch.object(backend, "_query_context", return_value=({"8"}, payload)):
|
||||
backend.refresh_context("xterm-handoff-check")
|
||||
|
||||
backend._emitSignal.assert_called_once_with(
|
||||
compositor_state_types.WORKSPACE_STATE_CHANGED,
|
||||
{"8"},
|
||||
"xterm-handoff-check",
|
||||
payload,
|
||||
)
|
||||
|
||||
def test_query_failure_emits_unknown_instead_of_preserving_stale_i3_context(self):
|
||||
backend = compositor_state_i3.I3WorkspaceBackend(i3ipc_module=types.SimpleNamespace())
|
||||
backend._active = True
|
||||
|
||||
Reference in New Issue
Block a user