[issue17471] Patch for Additional Test Coverage for urllib.error

2013-03-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset ae9aea1b3546 by Senthil Kumaran in branch '3.2': #17471 - Increasing the urllib.error test coverage. Bringing it to 100%. Based on patch contributed by Daniel Wozniak http://hg.python.org/cpython/rev/ae9aea1b3546 New changeset 8e9cf147fbca by Senth

[issue17471] Patch for Additional Test Coverage for urllib.error

2013-03-19 Thread Senthil Kumaran
Senthil Kumaran added the comment: Avoiding the static test is actually a good idea for Exception "messages", as there is no guarantee for those to be consistent across revs. But this one is slightly different in HTTPError str represent and we better be consistent in this. I dont see changing

[issue17471] Patch for Additional Test Coverage for urllib.error

2013-03-19 Thread Daniel Wozniak
Daniel Wozniak added the comment: Sure, your way is much easier to tell what is getting tested. The only thing I was trying to avoid is including the static text "HTTP Error" so the test will not break if that static text changes. That said, I really doubt the text would change for any reason.

[issue17471] Patch for Additional Test Coverage for urllib.error

2013-03-19 Thread Senthil Kumaran
Senthil Kumaran added the comment: Daniel, Agree to your point. Sorry that i did not run the coverage before. I would prefer to do the check this way for readability of the test code and get to 100% coverage. >>> expected_errmsg = 'HTTP Error %s: %s' %(err.code, err.msg) >>>

[issue17471] Patch for Additional Test Coverage for urllib.error

2013-03-19 Thread Daniel Wozniak
Daniel Wozniak added the comment: Senthil, The two lines you excluded from that patch give us coverage on HTTPError.__str__ , I added to the existing interface test so as not to re-produce the code there. I still think it could be added since it will give us that last line of coverage and ver

[issue17471] Patch for Additional Test Coverage for urllib.error

2013-03-19 Thread Senthil Kumaran
Senthil Kumaran added the comment: Daniel - I could not really get the need for this check. +>>> msg = str(err) +>>> str(err.code) in msg and err.msg in msg The other one was really useful and probably covered the reasonstr. Thanks for the patch. -- resolution: -> fixed stage

[issue17471] Patch for Additional Test Coverage for urllib.error

2013-03-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 33f02ccb5301 by Senthil Kumaran in branch '3.2': #17471 - Improve urllib2 test coverage. Patch contributed by Daniel Wozniak http://hg.python.org/cpython/rev/33f02ccb5301 New changeset 4e59a7fc69c6 by Senthil Kumaran in branch '3.3': #17471 - merge

[issue17471] Patch for Additional Test Coverage for urllib.error

2013-03-18 Thread Senthil Kumaran
Senthil Kumaran added the comment: Thanks Daniel. I will commit it. -- assignee: -> orsenthil nosy: +orsenthil ___ Python tracker ___ ___

[issue17471] Patch for Additional Test Coverage for urllib.error

2013-03-18 Thread Daniel Wozniak
New submission from Daniel Wozniak: Adding test to get 100% coverage in urllib.error. -- components: Tests files: patch.diff keywords: patch messages: 184554 nosy: dwoz priority: normal severity: normal status: open title: Patch for Additional Test Coverage for urllib.error type: enhance