After Ned Batchelder&#39;s talk in Python I spent a few minutes talking about how nice it is to have as much (or even more!) test code lines than source code lines.<br><br>I have put together a small script that will count the lines of code in a given directory and will compare them to your test code lines with a nice output (e.g. percentage, total lines, lines per file etc...).<br>
<br>Ideally, this could become a plugin for Nose (or py.test), but for now, it will create an executable symlink so you can run it anywhere.<br><br>The project page: <a href="http://code.google.com/p/pygora/">http://code.google.com/p/pygora/</a><br>
<br>I am using distribute to package Pygora, you can install it by:<br><b><br></b><blockquote><b>sudo easy_install pygora</b><br></blockquote><br>And, if you were not wondering already, the name comes from a *goat*: <b>Pygora Goat</b> is a <a href="http://en.wikipedia.org/wiki/Crossbreeding" title="Crossbreeding" class="mw-redirect">cross</a> between the <a href="http://en.wikipedia.org/wiki/Pygmy_goat" title="Pygmy goat">Pygmy Goat</a> and the <a href="http://en.wikipedia.org/wiki/Angora_goat" title="Angora goat">Angora Goat</a> that produces three distinct kinds of fleece and has the smaller size of the Pygmy.<br>
<a href="http://en.wikipedia.org/wiki/Pygora_goat">Source: Wikipedia</a><br><br><br>Pygora could do better in telling what lines to count with a nice regex, but this first release will get you an idea, enhancements will follow.<br>
<br><br>Thanks for an awesome an inspiring talk Ned!<br><br><br>




<br clear="all"><br>-- <br>Alfredo Deza<br><br>