STINNER Victor <vstin...@redhat.com> added the comment: MultiPhaseExtensionModuleTests.test_bad_traverse() of Lib/test/test_importlib/extension/test_loader.py runs the following code: --- import importlib.util as util spec = util.find_spec('_testmultiphase') spec.name = '_testmultiphase_with_bad_traverse' m = spec.loader.create_module(spec) ---
And then check that the Python "failed": that the exit code is non-zero... That's a weak test: if the script fails before calling spec.loader.create_module(), the test also pass. If the function raises an exception but don't crash, the test pass as well. More generally, I'm not sure about the idea of making sure that doing bad stuff with traverse does crash. What is the purpose of the test? In the meanwhile, I fixed bpo-33629 by adding test.support.SuppressCrashReport(). I'm not asking to do something. Maybe it's fine to keep the current test. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32374> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com