mirror of
https://github.com/python/cpython.git
synced 2025-10-01 12:52:18 +00:00
bpo-33629: Prevent coredump in test_importlib (GH-7090)
bpo-32374, bpo-33629: Use support.SuppressCrashReport() in
test_bad_traverse() of MultiPhaseExtensionModuleTests to prevent
leaking a core dump file.
(cherry picked from commit 483000e164
)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
This commit is contained in:
parent
2fe940c727
commit
d9eb22c67c
1 changed files with 4 additions and 1 deletions
|
@ -275,10 +275,13 @@ class MultiPhaseExtensionModuleTests(abc.LoaderTests):
|
|||
(Multiphase initialization modules only)
|
||||
'''
|
||||
script = """if True:
|
||||
from test import support
|
||||
import importlib.util as util
|
||||
spec = util.find_spec('_testmultiphase')
|
||||
spec.name = '_testmultiphase_with_bad_traverse'
|
||||
m = spec.loader.create_module(spec)"""
|
||||
|
||||
with support.SuppressCrashReport():
|
||||
m = spec.loader.create_module(spec)"""
|
||||
assert_python_failure("-c", script)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue