diff --git a/Lib/test/test_importlib/extension/test_loader.py b/Lib/test/test_importlib/extension/test_loader.py index 53ac3c71d4b..57ba7083d37 100644 --- a/Lib/test/test_importlib/extension/test_loader.py +++ b/Lib/test/test_importlib/extension/test_loader.py @@ -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)