Message317616
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. |
|
Date |
User |
Action |
Args |
2018-05-24 20:24:02 | vstinner | set | recipients:
+ vstinner, ncoghlan, pitrou, scoder, petr.viktorin, docs@python, Dormouse759, miss-islington |
2018-05-24 20:24:02 | vstinner | set | messageid: <1527193442.91.0.682650639539.issue32374@psf.upfronthosting.co.za> |
2018-05-24 20:24:02 | vstinner | link | issue32374 messages |
2018-05-24 20:24:02 | vstinner | create | |
|