When verbose mode if OFF, test.support.transient_internet prints out what resource was unavailable before raising the ResourceDenied exception. Not sure if this is a bug (since it has existed for a while) or it is on purpose and just happens to seem counter-intuitive. Assigning to Victor since it seems to be his code (that Antoine applied).
I'm pretty sure this was intentional. It is analogous to Skip messages and the messages issued when a resource hasn't been enabled, which also print when verbose is not true: the test wasn't run, and it lets you know why.
On Fri, Aug 5, 2011 at 04:33, R. David Murray <report@bugs.python.org>wrote: It just seems odd to print when verbosity is off, but not when it is on. I don't have the repo in front of me right now, but is there some other mechanism which prints out similar info when verbosity is on? > ---------- > nosy: +r.david.murray > > _______________________________________ > Python tracker <report@bugs.python.org> > <http://bugs.python.org/issue12693> > _______________________________________ >
I don't see any such code in the 3.3 source for the context manager. There the resource name is put in the ResourceDenied message. I think we'll need the reproducer.