Skip to content

Commit f01f3c6

Browse files
authored
Merge pull request python#12 from paulmon/win32-arm-nanoserver
Windows arm32 - fix failing tests or skip
2 parents 2f233f6 + 84e11fe commit f01f3c6

File tree

114 files changed

+277
-267
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+277
-267
lines changed

Lib/_osx_support.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def _find_executable(executable, path=None):
3838
paths = path.split(os.pathsep)
3939
base, ext = os.path.splitext(executable)
4040

41-
if (sys.platform == 'win32') and (ext != '.exe'):
41+
if (sys.platform.startswith('win')) and (ext != '.exe'):
4242
executable = executable + '.exe'
4343

4444
if not os.path.isfile(executable):

Lib/_pyio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import sys
1111
# Import _thread instead of threading to reduce startup cost
1212
from _thread import allocate_lock as Lock
13-
if sys.platform in {'win32', 'cygwin'}:
13+
if sys.platform in {'win32', 'win-arm', 'cygwin'}:
1414
from msvcrt import setmode as _setmode
1515
else:
1616
_setmode = None

Lib/asyncio/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
tasks.__all__ +
3636
transports.__all__)
3737

38-
if sys.platform == 'win32': # pragma: no cover
38+
if sys.platform.startswith('win'): # pragma: no cover
3939
from .windows_events import *
4040
__all__ += windows_events.__all__
4141
else:

Lib/asyncio/unix_events.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
)
3333

3434

35-
if sys.platform == 'win32': # pragma: no cover
35+
if sys.platform.startswith('win'): # pragma: no cover
3636
raise ImportError('Signals are not really supported on Windows')
3737

3838

Lib/asyncio/windows_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import sys
44

5-
if sys.platform != 'win32': # pragma: no cover
5+
if not sys.platform.startswith('win'): # pragma: no cover
66
raise ImportError('win32 only')
77

88
import _winapi

Lib/ctypes/test/test_bytes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class X(Structure):
5252
self.assertEqual(x.a, "abc")
5353
self.assertEqual(type(x.a), str)
5454

55-
@unittest.skipUnless(sys.platform == "win32", 'Windows-specific test')
55+
@unittest.skipUnless(sys.platform.startswith("win"), 'Windows-specific test')
5656
def test_BSTR(self):
5757
from _ctypes import _SimpleCData
5858
class BSTR(_SimpleCData):

Lib/ctypes/test/test_find.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class Test_OpenGL_libs(unittest.TestCase):
1010
@classmethod
1111
def setUpClass(cls):
1212
lib_gl = lib_glu = lib_gle = None
13-
if sys.platform == "win32":
13+
if sys.platform.startswith("win"):
1414
lib_gl = find_library("OpenGL32")
1515
lib_glu = find_library("Glu32")
1616
elif sys.platform == "darwin":

Lib/ctypes/test/test_functions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
import _ctypes_test
1919
dll = CDLL(_ctypes_test.__file__)
20-
if sys.platform == "win32":
20+
if sys.platform.startswith("win"):
2121
windll = WinDLL(_ctypes_test.__file__)
2222

2323
class POINT(Structure):
@@ -341,7 +341,7 @@ class S2H(Structure):
341341
s2h = dll.ret_2h_func(inp)
342342
self.assertEqual((s2h.x, s2h.y), (99*2, 88*3))
343343

344-
@unittest.skipUnless(sys.platform == "win32", 'Windows-specific test')
344+
@unittest.skipUnless(sys.platform.startswith("win"), 'Windows-specific test')
345345
def test_struct_return_2H_stdcall(self):
346346
class S2H(Structure):
347347
_fields_ = [("x", c_short),
@@ -369,7 +369,7 @@ class S8I(Structure):
369369
self.assertEqual((s8i.a, s8i.b, s8i.c, s8i.d, s8i.e, s8i.f, s8i.g, s8i.h),
370370
(9*2, 8*3, 7*4, 6*5, 5*6, 4*7, 3*8, 2*9))
371371

372-
@unittest.skipUnless(sys.platform == "win32", 'Windows-specific test')
372+
@unittest.skipUnless(sys.platform.startswith("win"), 'Windows-specific test')
373373
def test_struct_return_8H_stdcall(self):
374374
class S8I(Structure):
375375
_fields_ = [("a", c_int),

Lib/ctypes/test/test_pointers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def test_pointers_bool(self):
192192
self.assertEqual(bool(CFUNCTYPE(None)(42)), True)
193193

194194
# COM methods are boolean True:
195-
if sys.platform == "win32":
195+
if sys.platform.startswith("win"):
196196
mth = WINFUNCTYPE(None)(42, "name", (), None)
197197
self.assertEqual(bool(mth), True)
198198

Lib/ctypes/test/test_random_things.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ def callback_func(arg):
55
42 / arg
66
raise ValueError(arg)
77

8-
@unittest.skipUnless(sys.platform == "win32", 'Windows-specific test')
8+
@unittest.skipUnless(sys.platform.startswith("win"), 'Windows-specific test')
99
class call_function_TestCase(unittest.TestCase):
1010
# _ctypes.call_function is deprecated and private, but used by
1111
# Gary Bishp's readline module. If we have it, we must test it as well.

0 commit comments

Comments
 (0)