File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 9
9
import fractions
10
10
import gc
11
11
import io
12
- import importlib
13
12
import locale
14
13
import math
15
14
import os
32
31
from operator import neg
33
32
from test import support
34
33
from test .support import (cpython_only , swap_attr , maybe_get_event_loop_policy )
34
+ from test .support .import_helper import import_module
35
35
from test .support .os_helper import (EnvironmentVarGuard , TESTFN , unlink )
36
36
from test .support .script_helper import assert_python_ok
37
37
from test .support .warnings_helper import check_warnings
@@ -2413,11 +2413,7 @@ def detach_readline(self):
2413
2413
# since test_builtin is not intended to test
2414
2414
# the readline module, but the builtins module.
2415
2415
if "readline" in sys .modules :
2416
- try :
2417
- c = importlib .import_module ("ctypes" )
2418
- except ImportError :
2419
- self .skipTest ("the readline module is loaded" )
2420
-
2416
+ c = import_module ("ctypes" )
2421
2417
fp_api = "PyOS_ReadlineFunctionPointer"
2422
2418
prev_value = c .c_void_p .in_dll (c .pythonapi , fp_api ).value
2423
2419
c .c_void_p .in_dll (c .pythonapi , fp_api ).value = None
You can’t perform that action at this time.
0 commit comments