test(tools): skip the window placement test without a desktop shell

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
LeandroLP23andClaude Opus 5.5 committed 2026-11-03 23:04:46 +01:00
1 parent 72264c25bd
commit 39b52ea6c0
1 file changed
+3 -1
+3 -1
View File
@@ -287,8 +287,10 @@ class SessionTests(unittest.TestCase):
window = ("import ctypes; user32 = ctypes.WinDLL('user32'); user32.CreateWindowExW.argtypes = [ctypes.c_uint, ctypes.c_wchar_p, ctypes.c_wchar_p, ctypes.c_uint] + [ctypes.c_int] * 4 + [ctypes.c_void_p] * 4; "
"user32.CreateWindowExW(0x08000000, 'STATIC', 'title_run test', 0x10CF0000, 100, 100, 200, 200, None, None, None, None); message = ctypes.create_string_buffer(64)\n"
"while user32.GetMessageW(message, None, 0, 0) > 0: user32.DispatchMessageW(message)")
session = self.start(window)
user32 = title_run.user32
if not user32.FindWindowW("Progman", None):
self.skipTest("no desktop shell in this session")
session = self.start(window)
user32.GetWindow.restype = title_run.wintypes.HWND
user32.GetWindow.argtypes = (title_run.wintypes.HWND, title_run.wintypes.UINT)
name = title_run.ctypes.create_unicode_buffer(256)