Issue 12693: test.support.transient_internet prints to stderr when verbose is false (original) (raw)

Created on 2011-08-05 05:14 by brett.cannon, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
unnamed brett.cannon,2011-08-05 18:00
Messages (5)
msg141646 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2011-08-05 05:14
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).
msg141655 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2011-08-05 11:33
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.
msg141674 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2011-08-05 18:00
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> > _______________________________________ >
msg141675 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2011-08-05 18:14
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.
msg142094 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2011-08-15 02:20
The line from the source I am talking about is http://hg.python.org/cpython/file/49e9e34da512/Lib/test/support.py#l943 . And as for the output: > ./python.exe -m test -uall test_ssl [1/1] test_ssl Resource 'ipv6.google.com' is not available 1 test OK.
History
Date User Action Args
2022-04-11 14:57:20 admin set github: 56902
2013-01-25 19:25:33 brett.cannon set status: open -> closedresolution: works for me
2011-08-15 02:20:04 brett.cannon set messages: +
2011-08-05 18:14:17 r.david.murray set messages: +
2011-08-05 18:00:18 brett.cannon set files: + unnamedmessages: +
2011-08-05 11:33:41 r.david.murray set nosy: + r.david.murraymessages: +
2011-08-05 05:14:30 brett.cannon create