[3.12] Add support.MS_WINDOWS constant (#110446) (#110452)

Add support.MS_WINDOWS constant (#110446)

(cherry picked from commit e0c4437793)
This commit is contained in:
Victor Stinner 2023-10-06 03:26:14 +02:00 committed by GitHub
parent 67028f0c15
commit e188534607
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 27 additions and 23 deletions

View file

@ -1,8 +1,6 @@
# Run the tests in Programs/_testembed.c (tests for the CPython embedding APIs)
from test import support
from test.support import import_helper
from test.support import os_helper
from test.support import requires_specialization
from test.support import import_helper, os_helper, MS_WINDOWS
import unittest
from collections import namedtuple
@ -21,7 +19,6 @@ import textwrap
if not support.has_subprocess_support:
raise unittest.SkipTest("test module requires subprocess")
MS_WINDOWS = (os.name == 'nt')
MACOS = (sys.platform == 'darwin')
PYMEM_ALLOCATOR_NOT_SET = 0
PYMEM_ALLOCATOR_DEBUG = 2
@ -347,7 +344,7 @@ class EmbeddingTests(EmbeddingTestsMixin, unittest.TestCase):
out, err = self.run_embedded_interpreter("test_repeated_simple_init")
self.assertEqual(out, 'Finalized\n' * INIT_LOOPS)
@requires_specialization
@support.requires_specialization
def test_specialized_static_code_gets_unspecialized_at_Py_FINALIZE(self):
# https://github.com/python/cpython/issues/92031