bare excepts

Jamie Wilkinson jaq at spacepants.org
Tue Jan 3 15:02:54 GMT 2006


This one time, at band camp, John Arbash Meinel wrote:
>mlh wrote:
>> On Tue, Jan 03, 2006 at 04:17:06PM +1100, Robert Collins wrote:
>> 
>>>What do you guys think of a test for bare excepts? I just spent ~ 30
>>>minutes tracking down a bug that was hidden by:
>> 
>> 
>> Wouldn't pychecker and it's ilk get this sort of stuff?
>> 
>
>>From what I've seen it seems like it should. I suppose one of our test
>cases could be to run pychecker if it is available. But I think whatever
>we do it needs to be in the test suite, since we are used to running
>that, and not trying to remember to run another command.

After trying to do this with some production code elsewhere, I strongly
recommend you don't make pychecker automatic as part of the selftest.
Various versions of pychecker will report false positives on your code,
mostly due to it trailing the interpreter's syntax by a long period of time,
and in a situation like bzr's where you don't have any control over the
versions of the tools installed, you'll have to work around these bugs.

Including a .pycheckerrc in the branch so that one could run it if one
wanted would be fine, though.




More information about the bazaar mailing list