bare excepts
John Arbash Meinel
john at arbash-meinel.com
Tue Jan 3 14:52:27 GMT 2006
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.
Also, I was thinking about writing a test that checks for pep8
conformance. If pychecker would do that already, it would be very nice.
As much as I try to get my whitespace correct, I always seem to miss one
or two, and having something automated check up after me is a lot more
efficient than making Robert do it.
Is there an easy way to check PEP8? I was thinking of just writing a
state machine which would match class and def, and look for docstrings
(one line has """foo""", and multiline has """foo\n\nstuff\n"""). But it
seems like quite a bit of code...
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060103/f6c3f476/attachment.pgp
More information about the bazaar
mailing list