|
17 | 17 |
|
18 | 18 | import _ctypes_test |
19 | 19 | dll = CDLL(_ctypes_test.__file__) |
20 | | -if sys.platform == "win32": |
| 20 | +if sys.platform.startswith("win"): |
21 | 21 | windll = WinDLL(_ctypes_test.__file__) |
22 | 22 |
|
23 | 23 | class POINT(Structure): |
@@ -341,7 +341,7 @@ class S2H(Structure): |
341 | 341 | s2h = dll.ret_2h_func(inp) |
342 | 342 | self.assertEqual((s2h.x, s2h.y), (99*2, 88*3)) |
343 | 343 |
|
344 | | - @unittest.skipUnless(sys.platform == "win32", 'Windows-specific test') |
| 344 | + @unittest.skipUnless(sys.platform.startswith("win"), 'Windows-specific test') |
345 | 345 | def test_struct_return_2H_stdcall(self): |
346 | 346 | class S2H(Structure): |
347 | 347 | _fields_ = [("x", c_short), |
@@ -369,7 +369,7 @@ class S8I(Structure): |
369 | 369 | self.assertEqual((s8i.a, s8i.b, s8i.c, s8i.d, s8i.e, s8i.f, s8i.g, s8i.h), |
370 | 370 | (9*2, 8*3, 7*4, 6*5, 5*6, 4*7, 3*8, 2*9)) |
371 | 371 |
|
372 | | - @unittest.skipUnless(sys.platform == "win32", 'Windows-specific test') |
| 372 | + @unittest.skipUnless(sys.platform.startswith("win"), 'Windows-specific test') |
373 | 373 | def test_struct_return_8H_stdcall(self): |
374 | 374 | class S8I(Structure): |
375 | 375 | _fields_ = [("a", c_int), |
|
0 commit comments