Message51942
This looks useful.
It would be nice to test failure cases too (e.g. wrong password, .add_password() not called, ...).
I think if this goes into a new file (which might be reasonable), it should be named something like test_urllib2_localnet.py , to allow for adding more loopback tests, which will not always involve proxy handling. I suppose it should NOT depend on the network resource flag (Lib/test/regrtest.py -u network) since it's only localhost.
Style (see PEP 8):
Don't put whitespace inside brackets -- e.g. bad: fn( arg ) good: fn(arg)
Use this_kind_of_name or thiskind if short, not thisKind.
Imports and classes etc. don't need comments to label them as such. Probably is useful to label the BaseHTTPServer code though (maybe '# Local proxy test infrastructure').
See e.g. end of Lib/test/test_urllib2net.py for appropriate stdlib test boilerplate.
Your patch has inconsistent line endings, BTW.
|
|
Date |
User |
Action |
Args |
2007-08-23 15:56:43 | admin | link | issue1667860 messages |
2007-08-23 15:56:43 | admin | create | |
|