Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d9eb22c

Browse filesBrowse files
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 483000e) Co-authored-by: Victor Stinner <vstinner@redhat.com>
1 parent 2fe940c commit d9eb22c
Copy full SHA for d9eb22c

File tree

Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed

‎Lib/test/test_importlib/extension/test_loader.py

Copy file name to clipboardExpand all lines: Lib/test/test_importlib/extension/test_loader.py
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,10 +275,13 @@ def test_bad_traverse(self):
275275
(Multiphase initialization modules only)
276276
'''
277277
script = """if True:
278+
from test import support
278279
import importlib.util as util
279280
spec = util.find_spec('_testmultiphase')
280281
spec.name = '_testmultiphase_with_bad_traverse'
281-
m = spec.loader.create_module(spec)"""
282+
283+
with support.SuppressCrashReport():
284+
m = spec.loader.create_module(spec)"""
282285
assert_python_failure("-c", script)
283286

284287

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.