Petr Viktorin <encu...@gmail.com> added the comment:

> 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.

That's a good argument, thanks.
Marcel, would you mind adding a patch for that?

> 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?

This particular kind of bad traverse is quite easy to write if an extension 
author doesn't read docs carefully, or has read an old version of them (before 
the fix here). And resulting errors aren't too obvious. So, there's code to 
crash early and loudly in "--with-pydebug" for simple oversight cases. See 
comment at the call site of bad_traverse_test in Objects/moduleobject.c
And since there's code, there's a test to make sure it works :)

> In the meanwhile, I fixed bpo-33629 by adding 
> test.support.SuppressCrashReport().

Thanks! Didn't know about that one, will keep it in mind for next time!

----------

_______________________________________
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

Reply via email to