-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Barry Warsaw wrote:
On Apr 27, 2010, at 02:40 PM, firstname.lastname@example.org wrote:
On 01:38 pm, email@example.com wrote:
- have unit tests that fail before the patch and succeed after
This list would make a good addition to one of the cpython development pages. If potential contributors could find this information, then they'd be much more likely to participate by doing reviews.
It would be kind of cool if there were some best practices for running said unittest both with and without the patch enabled. Kind of like using #ifdefs in C but without all the commenting-out-commenting-in error proneness. I guess you could do something like
if os.getenv('BUG1234'): # Patch the frobnicator to not bloviate.
Maybe more trouble than it's worth, and not always feasible of course, but I'm wondering how (or maybe if) people do things this way.
With Bazaar, I often use a loom with two threads - a bottom one that contains the test that fails, and a top one that contains the fix for the test. It's a great way to develop a patch, but you lose that once you flatten the code for review.
You can always "shelve" the part of the patch which isn't the test: I do that pretty frequently in the Zope tree, where I am now doing most development with bzr.
Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 firstname.lastname@example.org Palladion Software "Excellence by Design" http://palladion.com