Skip to content

Commit 2ebec1f

Browse files
committed
pythongh-110119: Fix test_importlib --disable-gil Windows test failures
Use "t" in the expected tag for `--disable-gil` builds in test_tagged_suffix.
1 parent 1f3af03 commit 2ebec1f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎Lib/test/test_importlib/test_windows.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import os
55
import re
66
import sys
7+
import sysconfig
78
import unittest
89
from test.support import import_helper
910
from contextlib import contextmanager
@@ -111,7 +112,9 @@ def test_module_not_found(self):
111112
class WindowsExtensionSuffixTests:
112113
def test_tagged_suffix(self):
113114
suffixes = self.machinery.EXTENSION_SUFFIXES
114-
expected_tag = ".cp{0.major}{0.minor}-{1}.pyd".format(sys.version_info,
115+
threading_tag = "t" if sysconfig.get_config_var("Py_NOGIL") else ""
116+
expected_tag = ".cp{0.major}{0.minor}{1}-{2}.pyd".format(sys.version_info,
117+
threading_tag,
115118
re.sub('[^a-zA-Z0-9]', '_', get_platform()))
116119
try:
117120
untagged_i = suffixes.index(".pyd")

0 commit comments

Comments
 (0)