diff options
author | Erlend E. Aasland <erlend@python.org> | 2024-04-03 15:11:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-03 15:11:36 +0200 |
commit | ea94b3b149eeadf33c2f7c46f16dcda0adc7cf4e (patch) | |
tree | 7fc58f8dcd7513427c7ea2ff9d7bad523be1118a /Lib/test/test_repl.py | |
parent | 2ec6bb4111d2c03c1cac02b27c74beee7e5a2a05 (diff) | |
download | cpython-ea94b3b149eeadf33c2f7c46f16dcda0adc7cf4e.tar.gz cpython-ea94b3b149eeadf33c2f7c46f16dcda0adc7cf4e.zip |
gh-116303: Skip test module dependent tests if test modules are unavailable (#117341)
Diffstat (limited to 'Lib/test/test_repl.py')
-rw-r--r-- | Lib/test/test_repl.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_repl.py b/Lib/test/test_repl.py index a28d1595f44..457279a4db6 100644 --- a/Lib/test/test_repl.py +++ b/Lib/test/test_repl.py @@ -8,6 +8,7 @@ from textwrap import dedent from test import support from test.support import cpython_only, has_subprocess_support, SuppressCrashReport from test.support.script_helper import kill_python +from test.support.import_helper import import_module if not has_subprocess_support: @@ -64,6 +65,7 @@ class TestInteractiveInterpreter(unittest.TestCase): # _PyRefchain_Trace() on memory allocation error. @unittest.skipIf(support.Py_TRACE_REFS, 'cannot test Py_TRACE_REFS build') def test_no_memory(self): + import_module("_testcapi") # Issue #30696: Fix the interactive interpreter looping endlessly when # no memory. Check also that the fix does not break the interactive # loop when an exception is raised. |