Unverified Kaydet (Commit) fc0356d2 authored tarafından Miss Islington (bot)'s avatar Miss Islington (bot) Kaydeden (comit) GitHub

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 483000e1)
Co-authored-by: 's avatarVictor Stinner <vstinner@redhat.com>
üst f0e04b2a
...@@ -275,10 +275,13 @@ class MultiPhaseExtensionModuleTests(abc.LoaderTests): ...@@ -275,10 +275,13 @@ class MultiPhaseExtensionModuleTests(abc.LoaderTests):
(Multiphase initialization modules only) (Multiphase initialization modules only)
''' '''
script = """if True: script = """if True:
from test import support
import importlib.util as util import importlib.util as util
spec = util.find_spec('_testmultiphase') spec = util.find_spec('_testmultiphase')
spec.name = '_testmultiphase_with_bad_traverse' 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) assert_python_failure("-c", script)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment