homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author haggholm
Recipients haggholm
Date 2011年07月18日.05:46:26
SpamBayes Score 4.825029e-13
Marked as misclassified No
Message-id <1310967989.12.0.947671103278.issue12581@psf.upfronthosting.co.za>
In-reply-to
Content
Some very trivial tests to increase the test coverage on test_urlparse a bit; also changed a single line to use an ABC instead of attempting to use len() to verify that an object is "sequence-like" (as the comment put it). Mostly I’m trying to get my feet wet in submitting a patch in the manner suggested by the guide.
(Curiously, the full test suite coverage report cites 99%, even though the path in question does run: coverage.py fails somehow to mark an else branch consisting of a lone continue statement.)
Looking at this, I have some questions, but figured I might as well ask them along with a patch: First, whether this is appropriate use of ABCs in the library; second, whether it’s appropriate to submit related stuff like modified tests and (lightly) modified code in one patch, or whether I should rather open two issues.
Third, and more generally, I’m wondering whether the tests are appropriate. These are trivial in scope and nature, but I would be interested to know for future reference (and perhaps it would be useful to mention in the docs?) what the policy is on this. Essentially, I encoded expectations of current behaviour as "correct" and covered the 30-odd statements in urllib/parse.py that were not already covered by a full test run (explicit coverage by test_urlparse is still much lower!) on the assumption that, as the coverage guide suggests, more coverage is always better – and even without domain expertise assurance that current behaviour is correct, it at least provides some assurance that changes in behaviour will be discovered. Still, it’s perhaps *too* easy to get hung up on those coverage percentages: Is it *always* better to cover more (keeping in mind the limitations of once-over coverage), or would contributors be better advised not to cover code unless they are very, very confident that current behaviour is correct?
History
Date User Action Args
2011年07月18日 05:46:29haggholmsetrecipients: + haggholm
2011年07月18日 05:46:29haggholmsetmessageid: <1310967989.12.0.947671103278.issue12581@psf.upfronthosting.co.za>
2011年07月18日 05:46:28haggholmlinkissue12581 messages
2011年07月18日 05:46:27haggholmcreate

AltStyle によって変換されたページ (->オリジナル) /