Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit 52e2907

Browse files
committed
Issue python#22980: Skip a sysconfig test if _ctypes is not available.
Extracted from revision a1daf2d289ad by Zachary Ware.
1 parent 5fd832b commit 52e2907

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Lib/test/test_sysconfig.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
import shutil
66
from copy import copy
77

8-
from test.support import (run_unittest, TESTFN, unlink, check_warnings,
8+
from test.support import (run_unittest,
9+
import_module, TESTFN, unlink, check_warnings,
910
captured_stdout, skip_unless_symlink, change_cwd)
1011

1112
import sysconfig
@@ -387,7 +388,8 @@ def test_SO_in_vars(self):
387388

388389
@unittest.skipUnless(sys.platform == 'linux', 'Linux-specific test')
389390
def test_triplet_in_ext_suffix(self):
390-
import ctypes, platform, re
391+
ctypes = import_module('ctypes')
392+
import platform, re
391393
machine = platform.machine()
392394
suffix = sysconfig.get_config_var('EXT_SUFFIX')
393395
if re.match('(aarch64|arm|mips|ppc|powerpc|s390|sparc)', machine):

0 commit comments

Comments
 (0)