gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From leosim...@apache.org
Subject svn commit: r201486 - in /gump/branches/Gump3/bin/pylid-0.3: ./ doc/ doc/style/ test/ test/testTester/ test/testTester/addPath/ test/testTester/addPath/dir/ test/testTester/addPath/dir/dir/ test/testUnit/
Date Thu, 23 Jun 2005 21:12:08 GMT
Author: leosimons
Date: Thu Jun 23 14:12:05 2005
New Revision: 201486

URL: http://svn.apache.org/viewcvs?rev=201486&view=rev
Log:
I found a neat little unit test runner that generates coverage reports: pylid. Its released under the BSD license, so its cool to import here. It doesn't seem to have a public source repository. What I'm importing is the 0.3 version tarball published on the nullcube website. Some additional info in the README.txt

Added:
    gump/branches/Gump3/bin/pylid-0.3/
    gump/branches/Gump3/bin/pylid-0.3/LICENSE.txt
    gump/branches/Gump3/bin/pylid-0.3/README.txt
    gump/branches/Gump3/bin/pylid-0.3/doc/
    gump/branches/Gump3/bin/pylid-0.3/doc/admin.html
    gump/branches/Gump3/bin/pylid-0.3/doc/examples.html
    gump/branches/Gump3/bin/pylid-0.3/doc/index.html
    gump/branches/Gump3/bin/pylid-0.3/doc/intro.html
    gump/branches/Gump3/bin/pylid-0.3/doc/style/
    gump/branches/Gump3/bin/pylid-0.3/doc/style/style.css
    gump/branches/Gump3/bin/pylid-0.3/doc/usage.html
    gump/branches/Gump3/bin/pylid-0.3/pylid.py   (with props)
    gump/branches/Gump3/bin/pylid-0.3/test/
    gump/branches/Gump3/bin/pylid-0.3/test/README
    gump/branches/Gump3/bin/pylid-0.3/test/runAll.py   (with props)
    gump/branches/Gump3/bin/pylid-0.3/test/testTester/
    gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/
    gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/dir/
    gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/dir/dir/
    gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/dir/dir/test_one.py
    gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/dir/test_one.py
    gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/dir/test_one.pyc   (with props)
    gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/dir/test_two.py
    gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/dir/test_two.pyc   (with props)
    gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/dir/three.py
    gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/one.py
    gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/one.pyc   (with props)
    gump/branches/Gump3/bin/pylid-0.3/test/testUnit/
    gump/branches/Gump3/bin/pylid-0.3/test/testUnit/__init__.py
    gump/branches/Gump3/bin/pylid-0.3/test/testUnit/__init__.pyc   (with props)
    gump/branches/Gump3/bin/pylid-0.3/test/testUnit/docstrings.py
    gump/branches/Gump3/bin/pylid-0.3/test/testUnit/docstrings.pyc   (with props)
    gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getAnnotation.py
    gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getAnnotation.py.annotated
    gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getAnnotation.pyc   (with props)
    gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getGlobalStats.py
    gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getGlobalStats.pyc   (with props)
    gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getGlobalStats2.py
    gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getGlobalStats2.pyc   (with props)
    gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getRanges.py
    gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getRanges.py.annotated
    gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getRanges.pyc   (with props)
    gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getStats.py
    gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getStats.pyc   (with props)
    gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getStats2.py
    gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getSummary.py
    gump/branches/Gump3/bin/pylid-0.3/test/testUnit/makeCoverage.py
    gump/branches/Gump3/bin/pylid-0.3/test/testUnit/makeCoverage.pyc   (with props)
    gump/branches/Gump3/bin/pylid-0.3/test/testUnit/makeCoverageReentry.py
    gump/branches/Gump3/bin/pylid-0.3/test/testUnit/makeCoverageReentry.pyc   (with props)
    gump/branches/Gump3/bin/pylid-0.3/test/testUnit/makeCoverageReentry2.py
    gump/branches/Gump3/bin/pylid-0.3/test/testUnit/makeCoverageReentry2.pyc   (with props)
    gump/branches/Gump3/bin/pylid-0.3/test/testUnit/matching.py
    gump/branches/Gump3/bin/pylid-0.3/test/testUnit/matching.pyc   (with props)
    gump/branches/Gump3/bin/pylid-0.3/test/testUnit/mymod.py
    gump/branches/Gump3/bin/pylid-0.3/test/testUnit/mymod.pyc   (with props)
    gump/branches/Gump3/bin/pylid-0.3/test/testUnit/mymod2.py
    gump/branches/Gump3/bin/pylid-0.3/test/testUnit/mymod2.pyc   (with props)
    gump/branches/Gump3/bin/pylid-0.3/test/test_coverage.py
    gump/branches/Gump3/bin/pylid-0.3/test/test_coverage.pyc   (with props)
    gump/branches/Gump3/bin/pylid-0.3/test/test_tester.py
    gump/branches/Gump3/bin/pylid-0.3/test/test_tester.pyc   (with props)
    gump/branches/Gump3/bin/pylid-0.3/test/test_utils.py
    gump/branches/Gump3/bin/pylid-0.3/test/test_utils.pyc   (with props)

Added: gump/branches/Gump3/bin/pylid-0.3/LICENSE.txt
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/LICENSE.txt?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/LICENSE.txt (added)
+++ gump/branches/Gump3/bin/pylid-0.3/LICENSE.txt Thu Jun 23 14:12:05 2005
@@ -0,0 +1,28 @@
+ Copyright (c) 2004, Nullcube Pty Ltd
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are 
+met:
+
+    * Redistributions of source code must retain the above copyright 
+notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright 
+notice, this list of conditions and the following disclaimer in the 
+documentation and/or other materials provided with the distribution.
+    * Neither the name of Nullcube nor the names of its contributors may 
+be used to endorse or promote products derived from this software 
+without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+

Added: gump/branches/Gump3/bin/pylid-0.3/README.txt
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/README.txt?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/README.txt (added)
+++ gump/branches/Gump3/bin/pylid-0.3/README.txt Thu Jun 23 14:12:05 2005
@@ -0,0 +1,13 @@
+Pylid is a tool for running unit tests written using PyUnit created by 
+a company called nullcube. Its homepage is
+
+  http://www.nullcube.com/software/pylid.html
+
+It includes a feature for code coverage reports based on code by Gareth 
+Rees, who has a homepage for that functionality at
+
+  http://www.garethrees.org/2001/12/04/python-coverage/
+
+This readme was added by the gump team. See doc/index.html for a manual 
+to pylid usage.
+

Added: gump/branches/Gump3/bin/pylid-0.3/doc/admin.html
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/doc/admin.html?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/doc/admin.html (added)
+++ gump/branches/Gump3/bin/pylid-0.3/doc/admin.html Thu Jun 23 14:12:05 2005
@@ -0,0 +1,86 @@
+
+
+<html>
+	<head>
+		<LINK REL=StyleSheet HREF="./style/style.css" TYPE="text/css">
+	</head>
+		<a href="examples.html">&lt;--previous</a> |
+	<a href="./index.html">contents</a> |
+	next 
+
+	<hr>
+	<body>
+        <h1>Administrivia</h1>
+		<h2>Contact</h2>
+
+<p> Please send any comments, suggestions and bug reports to
+	<a href="mailto:aldo@nullcube.com">aldo@nullcube.com</a>.
+</p>
+
+
+
+<h2>License</h2>
+
+<p>PyLid is licensed under the BSD license. </p>
+
+<hr>
+
+<p> Copyright (c) 2004, Nullcube Pty Ltd<br>
+All rights reserved.</p>
+
+<p>Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+<ul>
+	<li> 
+	
+		Redistributions of source code must retain the above copyright notice,
+		this list of conditions and the following disclaimer.
+
+	</li>
+	<li>
+
+		Redistributions in binary form must reproduce the above copyright
+		notice, this list of conditions and the following disclaimer in the
+		documentation and/or other materials provided with the distribution.
+
+	</li>
+	<li>
+
+		Neither the name of Nullcube nor the names of its contributors may be
+		used to endorse or promote products derived from this software without
+		specific prior written permission.
+
+	</li>
+</ul>
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+</p>
+
+	</body>
+	<hr>
+    <table width="100%">
+        <tr>
+            <td>
+                	<a href="examples.html">&lt;--previous</a> |
+	<a href="./index.html">contents</a> |
+	next 
+
+            </td>
+            <td align="right">
+                (11/16/04)
+            </td>
+        </tr>
+    </table>
+	<center> Pylid Manual </center>
+</html>

Added: gump/branches/Gump3/bin/pylid-0.3/doc/examples.html
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/doc/examples.html?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/doc/examples.html (added)
+++ gump/branches/Gump3/bin/pylid-0.3/doc/examples.html Thu Jun 23 14:12:05 2005
@@ -0,0 +1,162 @@
+
+
+<html>
+	<head>
+		<LINK REL=StyleSheet HREF="./style/style.css" TYPE="text/css">
+	</head>
+		<a href="usage.html">&lt;--previous</a> |
+	<a href="./index.html">contents</a> |
+	<a href="admin.html">next--&gt;</a> 
+
+	<hr>
+	<body>
+        <h1>Examples</h1>
+		
+<h2> Project Structure </h2>
+
+<p> In order to to demonstrate the workings of PyLid, we have created a small
+mock-project with the following directory structure: </p>
+
+<pre>
+    /examples
+        silly.py
+        useless.py
+        tests/
+            test_project.py
+</pre>
+
+
+<p> Here, "silly.py" and "useless.py" are our two project files. All our unit
+tests live in the "tests" directory - in this case inside a single file called
+"test_project.py". The source for this example project can be found in the
+"examples" directory of the PyLid distribution. </p>
+
+
+<h2> Running Unit Tests </h2>
+
+<p> PyLid would usually be run from the "tests" directory. Note that the
+default values for the covery path options (-i, -e, -b), means that all of the
+project files are included for coverage, and all of the test files are excluded
+from coverage. The following is a simple PyLid run, with no options: </p>
+
+<code class="shell">
+<pre>
+&gt; pylid.py
+...
+----------------------------------------------------------------------
+Ran 3 tests in 0.001s
+
+OK
+</pre>
+</code>
+
+<p> By default PyLid simply runs your tests using the default PyUnit text test
+runner, without doing any coverage analysis. Below is the source for
+test_project.py:</p>
+
+<code>
+<pre><div class="pythoncode"><font color="#C00000">import</font> <font color="#000000">unittest</font>
+<font color="#C00000">import</font> <font color="#000000">silly</font><font color="#0000C0">,</font> <font color="#000000">useless</font>
+
+<font color="#C00000">class</font> <font color="#000000">uSilly</font><font color="#0000C0">(</font><font color="#000000">unittest</font><font color="#0000C0">.</font><font color="#000000">TestCase</font><font color="#0000C0">)</font><font color="#0000C0">:</font>
+    <font color="#C00000">def</font> <font color="#000000">test_silly</font><font color="#0000C0">(</font><font color="#000000">self</font><font color="#0000C0">)</font><font color="#0000C0">:</font>
+        <font color="#000000">self</font><font color="#0000C0">.</font><font color="#000000">failUnless</font><font color="#0000C0">(</font><font color="#000000">silly</font><font color="#0000C0">.</font><font color="#000000">silly</font><font color="#0000C0">(</font><font color="#0000C0">)</font> <font color="#0000C0">==</font> <font color="#0080C0">2</font><font color="#0000C0">)</font>
+
+    <font color="#C00000">def</font> <font color="#000000">test_sillier</font><font color="#0000C0">(</font><font color="#000000">self</font><font color="#0000C0">)</font><font color="#0000C0">:</font>
+        <font color="#000000">self</font><font color="#0000C0">.</font><font color="#000000">failUnless</font><font color="#0000C0">(</font><font color="#000000">silly</font><font color="#0000C0">.</font><font color="#000000">sillier</font><font color="#0000C0">(</font><font color="#0080C0">1</font><font color="#0000C0">)</font> <font color="#0000C0">==</font> <font color="#0080C0">1</font><font color="#0000C0">)</font>
+
+<font color="#C00000">class</font> <font color="#000000">uUseless</font><font color="#0000C0">(</font><font color="#000000">unittest</font><font color="#0000C0">.</font><font color="#000000">TestCase</font><font color="#0000C0">)</font><font color="#0000C0">:</font>
+    <font color="#C00000">def</font> <font color="#000000">test_useless</font><font color="#0000C0">(</font><font color="#000000">self</font><font color="#0000C0">)</font><font color="#0000C0">:</font>
+        <font color="#000000">self</font><font color="#0000C0">.</font><font color="#000000">failUnless</font><font color="#0000C0">(</font><font color="#000000">useless</font><font color="#0000C0">.</font><font color="#000000">useless</font><font color="#0000C0">(</font><font color="#0000C0">)</font> <font color="#0000C0">==</font> <font color="#0080C0">0</font><font color="#0000C0">)</font><font color="#000000"></font></div></pre>
+</code>
+
+
+<p> Notice that we simply import "silly" and "useless" from here, even though
+these modules are not really accessible from the "test" directory. We can do
+this because the default argument to the project base option ("-b") is "..".
+I.e. the /examples directory is incuded in Python's search path. We can now be
+more specific about the tests we run:</p>
+
+<code class="shell">
+<pre>
+&gt; pylid -vv test_project.uSilly
+test_sillier (test_project.uSilly) ... ok
+test_silly (test_project.uSilly) ... ok
+
+----------------------------------------------------------------------
+Ran 2 tests in 0.002s
+
+OK
+</pre>
+</code>
+
+<p> The "-vv" option tells PyLid to be very verbose - in this case, the names
+of the unit tests are printed as they are run. As you can see, only the tests
+in the specified test case have been run. </p>
+
+
+<h2> Code Coverage </h2>
+
+<p> We can generate a code coverage stats summary simply by passing the "-s"
+flag to PyLid: </p> 
+
+<code class="shell">
+<pre>
+&gt; pylid.py -s
+----------------------------------------------------------------------
+Ran 3 tests in 0.001s
+
+OK
+
+
+                    Coverage
+                    ========
+
+[run ] [tot ] [percent]
+=======================
+[5   ] [6   ] [83.33 %]:     ../useless.py  
+                             5 
+[8   ] [13  ] [61.53 %]:     ../silly.py  
+                             7  [14...17] 
+
+Summary:
+                Statements Total: 19
+                Statements Run:   13
+                Percentage:       68.42%
+
+</pre>
+</code>
+
+
+<p> The output above tells us that 8 of the 13 statements in "silly.py", or
+61.53%, were run. Just below the filename is a brief summary of the lines that
+were not covered - in this case line 7, and lines 14-17 inclusive. If we now
+pass the "-p" flag to PyLid, an annotated version of each file is passed to our
+pager. For silly.py, the annotated version looks something like this:</p>
+
+
+<code>
+def&nbsp;silly():<br>&nbsp;&nbsp;&nbsp;&nbsp;x&nbsp;=&nbsp;1<br>&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;x:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x&nbsp;=&nbsp;2<br>&nbsp;&nbsp;&nbsp;&nbsp;else:<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x&nbsp;=&nbsp;0<br>&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;x<br><br>def&nbsp;sillier(a):<br>&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;a<br><br>def&nbsp;untested(a):<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;a:<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for&nbsp;i&nbsp;in&nbsp;range(10):<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;=&nbsp;a&nbsp;+&nbsp;1<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;a<br>
+</code>
+
+<p> Of course, coverage analysis can be combined with any of the other
+arguments to PyLid - we can view the code coverage for a specific test, for
+example, or prompt the unit test engine to give us more verbose output. </p>
+
+	</body>
+	<hr>
+    <table width="100%">
+        <tr>
+            <td>
+                	<a href="usage.html">&lt;--previous</a> |
+	<a href="./index.html">contents</a> |
+	<a href="admin.html">next--&gt;</a> 
+
+            </td>
+            <td align="right">
+                (11/16/04)
+            </td>
+        </tr>
+    </table>
+	<center> Pylid Manual </center>
+</html>

Added: gump/branches/Gump3/bin/pylid-0.3/doc/index.html
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/doc/index.html?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/doc/index.html (added)
+++ gump/branches/Gump3/bin/pylid-0.3/doc/index.html Thu Jun 23 14:12:05 2005
@@ -0,0 +1,56 @@
+
+
+<html>
+	<head>
+		<LINK REL=StyleSheet HREF="./style/style.css" TYPE="text/css">
+	</head>
+		previous |
+	<a href="./index.html">contents</a> |
+	<a href="intro.html">next--&gt;</a> 
+
+	<hr>
+	<body>
+        <h1></h1>
+		<html>
+	<head>
+		<LINK REL=StyleSheet HREF="./style/style.css" TYPE="text/css">
+	</head>
+<body>
+    <h1> Pylid Manual </h1>
+    <center>
+        <b>v0.3</b><br>
+        <a href="http://www.nullcube.com">www.nullcube.com</a>
+    </center>
+    <hr>
+    <h2> Contents </h2>
+        
+                        <ul>
+                                <li><a href="intro.html">Introduction</a></li>
+                                <li><a href="usage.html">Usage</a></li>
+                                <li><a href="examples.html">Examples</a></li>
+                                <li><a href="admin.html">Administrivia</a></li>
+                        </ul>
+                    
+    <hr>
+    Written and maintained by Aldo Cortesi
+        (<a href="mailto:aldo@nullcube.com">aldo@nullcube.com</a>).
+</body>
+</html>
+
+	</body>
+	<hr>
+    <table width="100%">
+        <tr>
+            <td>
+                	previous |
+	<a href="./index.html">contents</a> |
+	<a href="intro.html">next--&gt;</a> 
+
+            </td>
+            <td align="right">
+                (11/16/04)
+            </td>
+        </tr>
+    </table>
+	<center> Pylid Manual </center>
+</html>

Added: gump/branches/Gump3/bin/pylid-0.3/doc/intro.html
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/doc/intro.html?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/doc/intro.html (added)
+++ gump/branches/Gump3/bin/pylid-0.3/doc/intro.html Thu Jun 23 14:12:05 2005
@@ -0,0 +1,63 @@
+
+
+<html>
+	<head>
+		<LINK REL=StyleSheet HREF="./style/style.css" TYPE="text/css">
+	</head>
+		previous |
+	<a href="./index.html">contents</a> |
+	<a href="usage.html">next--&gt;</a> 
+
+	<hr>
+	<body>
+        <h1>Introduction</h1>
+		
+<p> PyLid is an integrated unit-test and coverage analysis tool. </p>
+
+<h2> Features </h2>
+
+<ul>
+
+    <li> Statistical coverage analysis. </li>
+
+	<li> Source annotation for a detailed view of coverage data. </li>
+
+	<li> Fine-grained selection of unit-tests from the command line. Allows you
+	to conveniently run all unit tests in a directory, all tests in a given
+	file, all tests in a given test-suite, or a specific test in a given
+	test-suite.  </li>
+
+</ul>
+
+
+<h2> Requirements </h2>
+
+<p> PyLid requires Python 2.3 or later.</p>
+
+
+<h2> Resources </h2>
+
+<ul>
+
+    <li>	<a href="http://www.garethrees.org/2001/12/04/python-coverage/">
+    Statement coverage for Python</a>, Gareth Rees, 2001 </li>
+
+</ul>
+
+	</body>
+	<hr>
+    <table width="100%">
+        <tr>
+            <td>
+                	previous |
+	<a href="./index.html">contents</a> |
+	<a href="usage.html">next--&gt;</a> 
+
+            </td>
+            <td align="right">
+                (11/16/04)
+            </td>
+        </tr>
+    </table>
+	<center> Pylid Manual </center>
+</html>

Added: gump/branches/Gump3/bin/pylid-0.3/doc/style/style.css
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/doc/style/style.css?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/doc/style/style.css (added)
+++ gump/branches/Gump3/bin/pylid-0.3/doc/style/style.css Thu Jun 23 14:12:05 2005
@@ -0,0 +1,8 @@
+        BODY { font-family: verdana,arial,helvetica,sans-serif; font-size:medium; color: #333333; }
+		CODE { font-size: medium; color: blue;}
+		code.SHELL { color: blue; }
+		code.OUTPUT { color: green; }
+        A:link { text-decoration:none; color: #6666aa; }
+        A:visited { text-decoration:none; color: #6666aa; }
+        A:active { text-decoration:none; color: #6666aa; }
+        A:hover { text-decoration; color:#FF0000 }

Added: gump/branches/Gump3/bin/pylid-0.3/doc/usage.html
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/doc/usage.html?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/doc/usage.html (added)
+++ gump/branches/Gump3/bin/pylid-0.3/doc/usage.html Thu Jun 23 14:12:05 2005
@@ -0,0 +1,135 @@
+
+
+<html>
+	<head>
+		<LINK REL=StyleSheet HREF="./style/style.css" TYPE="text/css">
+	</head>
+		<a href="intro.html">&lt;--previous</a> |
+	<a href="./index.html">contents</a> |
+	<a href="examples.html">next--&gt;</a> 
+
+	<hr>
+	<body>
+        <h1>Usage</h1>
+		
+
+<h2> Synopsis </h2>
+
+<code class="shell">
+pylid.py [-acdhqsv] [-b path] [-e path] [-i path] [test ...]
+</code>
+
+<h2> Options </h2>
+
+<h3> -c : Clear </h3>
+
+<p> Clear all .pyc and .pyo files before a run. When a .pyc file is first
+compiled, the name of the source file is saved along with the compiled code.
+This source file name is the concatenation of the element in sys.path in which
+it occurs, and relative part of the filename. This means that if a .pyc file is
+created from a file imported from a relative sys.path entry, the filename
+embedded in the file will be relative as well.  If, after a .pyc file has been
+created, you import the module from elsewhere, and then check the code
+co_filename entry, the relative filename will be meaningless in your program
+context. This interferes with PyLid's ability to find source files to perform a
+coverage analysis on. If the preceding explanation meant little to you, do not
+fear - simply include the -c option if your coverage results seem peculiar
+(i.e. files are skipped, etc).</p>
+
+<h3> -d : Debug </h3>
+
+<p> This suppresses the actual testing component of the unit tests run. This is
+handy during coding, since it allows exceptions to propagate out of the testing
+framework. </p>
+
+<h3> -a : Annotate </h3>
+
+<p> Allow the user to page through annotated source files, indicating lines not
+covered during a testing run. This makes use of the user's preferred pager, as
+defined in the "PAGER" environment variable. </p>
+
+<h3> -h : Help </h3>
+
+<p> Print usage information and exit. </p>
+
+<h3> -q : Quiet </h3>
+
+<p> Decrease the level of verbosity during testing. </p>
+
+<h3> -s : Stats </h3>
+
+<p> Give condensed coverage statistics at the end of the test run. This
+includes, the number of statements covered in each file, the percentage of
+coverage in each file, and a list of line numbers not covered for each file.
+</p>
+
+<h3> -v : Verbosity </h3>
+
+<p> Increase the level of verbosity during testing. </p>
+
+<h2> Specifying Tests </h2>
+
+<p> If no test is specified, PyLid will search the entire directory tree rooted
+at the current directory for files matching "test_*.py", and run all unit tests
+found in these files. Tests can also be specified by file, i.e. </p>
+
+<code class="shell">
+pylid.py test_foo.py
+</code>
+
+<p> By test case: </p>
+
+<code class="shell">
+pylid.py test_foo.uTestCase
+</code>
+
+<p> Or even by specific test: </p>
+
+<code class="shell">
+pylid.py test_foo.uTestCase.test_something
+</code>
+
+
+<h2> Controlling Coverage Paths </h2>  
+
+<h3> -b : Project Base </h3>
+
+<p> Specify the project base directory. This path will be added to sys.path,
+allowing unit test files to import modules from here. The default value is
+"..".</p>
+
+<h3> -i : Include </h3>
+
+<p> Specify the path to consider during code analysis. The default value for
+this parameter is "..", i.e. all code in the tree starting just above the
+current directory is included in analysis. </p>
+
+<h3> -e : Exclude </h3>
+
+<p> Specify a path to be excluded from coverage analysis. Usually, the argument
+to this option would lie within the include path - else there would be little
+point explicitly excluding it. The default for this option is ".", i.e. exclude
+all files in the current directory tree from analysis. This is desirable, since
+the current directory tree usually contains the unit tests themselves. This
+option can be passed multiple times. </p>
+
+
+
+
+	</body>
+	<hr>
+    <table width="100%">
+        <tr>
+            <td>
+                	<a href="intro.html">&lt;--previous</a> |
+	<a href="./index.html">contents</a> |
+	<a href="examples.html">next--&gt;</a> 
+
+            </td>
+            <td align="right">
+                (11/16/04)
+            </td>
+        </tr>
+    </table>
+	<center> Pylid Manual </center>
+</html>

Added: gump/branches/Gump3/bin/pylid-0.3/pylid.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/pylid.py?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/pylid.py (added)
+++ gump/branches/Gump3/bin/pylid-0.3/pylid.py Thu Jun 23 14:12:05 2005
@@ -0,0 +1,443 @@
+#!/usr/bin/env python2.3
+"""
+pylid v0.3
+
+Copyright (c) 2002, Nullcube Pty Ltd
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+*   Redistributions of source code must retain the above copyright notice, this
+    list of conditions and the following disclaimer.
+*   Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+*   Neither the name of Nullcube nor the names of its contributors may be used to
+    endorse or promote products derived from this software without specific prior
+    written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+"""
+import sys, parser, token, symbol, copy, getopt, unittest, os, fnmatch, os.path, time, glob, trace
+
+def isPathContained(outer, inner):
+    """
+       Does inner lie "within" outer?
+       Outer has to be an absolute path!
+    """
+    return (os.path.abspath(inner)[:len(outer)] == outer)
+
+
+def summariseList(lst):
+    """
+        Takes a list of numbers, and returns a summary.
+        Eg. [1, 2, 3, 4, 9] -> [(1, 4), 9]
+            [1, 2, 3, 7, 8, 9] -> [(1, 3), (7, 9)]
+    """
+    if len(lst) < 2:
+        return lst
+
+    ranges = []
+    start = 0
+    for i in range(1, len(lst)):
+        if (lst[i] - lst[i-1]) > 1:
+            if (i-1) == start:
+                start = i
+                ranges.append(lst[i-1])
+            else:
+                ranges.append((lst[start], lst[i-1]))
+                start = i
+    if lst[start] == lst[i]:
+        ranges.append(lst[i])
+    else:
+        ranges.append((lst[start], lst[i]))
+    return ranges
+
+
+class GlobDirectoryWalker:
+    """
+    A forward iterator that traverses files in a directory tree.
+    """
+    def __init__(self, directory, pattern='*'):
+        self.stack = [directory]
+        self.pattern = pattern
+        self.files = []
+        self.index = 0
+
+    def __getitem__(self, index):
+        while 1:
+            try:
+                file = self.files[self.index]
+                self.index = self.index + 1
+            except IndexError:
+                # pop next directory from stack
+                self.directory = self.stack.pop()
+                self.files = os.listdir(self.directory)
+                self.index = 0
+            else:
+                # got a filename
+                fullname = os.path.join(self.directory, file)
+                if os.path.isdir(fullname) and not os.path.islink(fullname):
+                    self.stack.append(fullname)
+                if fnmatch.fnmatch(file, self.pattern):
+                    return fullname
+
+
+class Coverage:
+    """
+        Analyse code coverage.
+    """
+    def __init__(self, coveragePath, excludeList=[]):
+        self.coveragePath = os.path.abspath(coveragePath)
+        self.excludeList = [os.path.abspath(x) for x in excludeList]
+        # Keys are filenames, values are dictionaries of line numbers.
+        self.linesRun = {}
+        self.statementsRun = {}
+        self.allStatements = {}
+        # Keys are filenames, values are lists of lines for statements not covered.
+        self.statementsNotRun = {}
+        # Data gathered by the _trace method
+        self._traceData = {}
+        # Is our calculated coverage up to date?
+        self.coverageUpToDate = 0
+
+    def _trace(self, frame, event, arg):
+        """
+            Called for every code event. We extract and take note of the
+            filename and line number.
+        """
+        self._traceData[(os.path.abspath(frame.f_code.co_filename), frame.f_lineno)] = 1
+        return self._trace
+
+    def _integrateTrace(self):
+        for i in self._traceData:
+            if (os.path.abspath(i[0])[:len(self.coveragePath)] == self.coveragePath):
+                if self.linesRun.has_key(i[0]):
+                    self.linesRun[i[0]][i[1]] = 1     
+                else:
+                    self.linesRun[i[0]] = {i[1]: 1}
+        self._traceData = {}
+
+    def start(self):
+        sys.settrace(self._trace)
+
+    def stop(self):
+        sys.settrace(None)
+        self.coverageUpToDate = 0
+
+    def _findTerminal(self, lst):
+        """
+            Find the first TERMINAL token and return its line number.
+        """
+        if token.ISTERMINAL(lst[0]):
+            return lst[2]
+        else:
+            return self._findTerminal(lst[1])
+            
+    def _makeCoverage(self):
+        """
+            Runs through the list of files, calculates a list of lines that
+            weren't covered, and writes the list to self.files["filenames"].
+        """
+        if not self.coverageUpToDate:
+            self._integrateTrace()
+            for fileName in self.linesRun.keys():
+                # We only want to get the parsed statement list once
+                if not self.allStatements.has_key(fileName):
+                    for p in self.excludeList:
+                        if isPathContained(p, fileName):
+                            del self.linesRun[fileName]
+                            break
+                    else:
+                        self.allStatements[fileName] = trace.find_executable_linenos(fileName)
+                        self.allStatements[fileName].update(self.linesRun[fileName])
+
+            # Calculate statementsRun
+            sr = {}
+            for fileName in self.linesRun:
+                sr[fileName] = {}
+                for i in self.linesRun[fileName]:
+                    if self.allStatements[fileName].has_key(i):
+                        sr[fileName][i] = 1
+            self.statementsRun = sr
+
+            # Calculate statementsNotRun
+            snr = {}
+            for fileName in self.allStatements:
+                snr[fileName] = []
+                for i in self.allStatements[fileName]:
+                    if not self.statementsRun[fileName].has_key(i):
+                        snr[fileName].append(i)
+                snr[fileName].sort()
+            self.statementsNotRun = snr
+            self.coverageUpToDate = 1
+
+    def getStats(self):
+        """
+            Returns a list of tuples, containing a dictionary of statistics each. 
+            [(name, resultDict)...]
+        """
+        self._makeCoverage()
+        allStats = []
+        for fileName in self.linesRun:
+            statDict = {}
+            statDict["allStatements"] = len(self.allStatements[fileName])
+            statDict["statementsRun"] = len(self.statementsRun[fileName])
+            if statDict["allStatements"]:
+                statDict["coverage"] = (float(statDict["statementsRun"])/float(statDict["allStatements"]))*100
+            else:
+                # Empty file (e.g. empty __init__.py)
+                statDict["coverage"] = 100.0
+            statDict["ranges"] = summariseList(self.statementsNotRun[fileName])
+            allStats.append((fileName, statDict))
+
+        def compare(a, b):
+            return cmp(len(self.statementsNotRun[a[0]]), len(self.statementsNotRun[b[0]]))
+
+        allStats.sort(compare)
+        return allStats
+
+    def getGlobalStats(self):
+        """
+            Returns a dictionary of statistics covering all files.
+        """
+        self._makeCoverage()
+        # Overall lines
+        statementsRun = 0
+        allStatements = 0
+        for fileName in self.linesRun:
+            statementsRun += len(self.statementsRun[fileName])
+            allStatements += len(self.allStatements[fileName])
+        if allStatements == 0:
+            perc = 0 
+        else:
+            perc = ((float(statementsRun)/float(allStatements))*100)
+
+        return {
+                    "statementsRun": statementsRun,
+                    "allStatements": allStatements,
+                    "percentage": perc
+                }
+
+    def getAnnotation(self):
+        """
+            Returns a dictionary with a list of snippets of text. Each snippet
+            is an annotated list of un-run lines.
+        """
+        self._makeCoverage()
+        annotations = {}
+        for fileName in self.statementsNotRun:
+            if self.statementsNotRun[fileName]:
+                lines = open(fileName).readlines()
+                for i in self.statementsNotRun[fileName]:
+                    lines[i-1] = "> " + lines[i-1]
+                annotations[fileName] = lines
+        return annotations
+
+
+class Tester:
+    def __init__(self, baseDir, include, exclude):
+        """
+            Takes the project base directory. This directory is inserted into
+            our path so that unit tests can import files/modules from there. 
+        """
+        # We want to be able to import from the current dir
+        self.cov = Coverage(include, exclude)
+        sys.path.insert(0, baseDir)
+        # We also insert the current directory, to make sure we can import
+        # source files in our test directory.
+        sys.path.insert(0, ".")
+        self.suite = unittest.TestSuite()
+        self.coverage = 0
+
+    def _addFile(self, path, coverage):
+        dirName, fileName = os.path.split(path)
+        sys.path.insert(0, dirName)
+        modname = os.path.splitext(os.path.basename(fileName))[0]
+        if coverage:
+            self.cov.start()
+        module = __import__(modname)
+        if coverage:
+            self.cov.stop()
+        tests = unittest.defaultTestLoader.loadTestsFromModule(module)
+        self.suite.addTest(tests)
+        del sys.path[0]
+
+    def addPath(self, path, coverage):
+        if os.path.isfile(path):
+            self._addFile(path, coverage)
+        elif os.path.isdir(path):
+            for filename in glob.glob(os.path.join(path, 'test_*.py')):
+                self._addFile(filename, coverage)
+        else:
+            # We now assume that it's a module
+            if coverage:
+                self.cov.start()
+            tests = unittest.defaultTestLoader.loadTestsFromName(path)
+            if coverage:
+                self.cov.stop()
+            self.suite.addTest(tests)
+
+    def coverageRun(self, verbosity=0):
+        """
+            "include" is a directory that should be included in the coverage analysis.
+            "exclude" is a set of directories that should be explicitly excluded. 
+        """
+        self.cov.start()
+        unittest.TextTestRunner(verbosity=verbosity).run(self.suite)
+        self.cov.stop()
+
+    def run(self, verbosity=0):
+        unittest.TextTestRunner(verbosity=verbosity).run(self.suite)
+
+    def debug(self):
+        self.suite.debug()
+
+    def coverageStats(self):
+        stats = self.cov.getStats()
+        print "[run ] [tot ] [percent]"
+        print "======================="
+        for i in stats:
+            print "[%-4s] [%-4s] [%-6.5s%%]:     %s  " % (    i[1]["statementsRun"],
+                                                              i[1]["allStatements"],
+                                                              i[1]["coverage"],
+                                                              i[0])
+            if i[1]["ranges"]:
+                print "                            ",
+                for j in i[1]["ranges"]:
+                    try:
+                        print "[%s...%s] "%(j[0], j[1]),
+                    except:
+                        print "%s "%(j),
+                print
+
+    def coverageSummary(self):
+        x = self.cov.getGlobalStats()
+        print
+        print "Summary:"
+        print "\t\tStatements Total: %s"%x["allStatements"]
+        print "\t\tStatements Run:   %s"%x["statementsRun"]
+        print "\t\tPercentage:       %.5s%%"%x["percentage"]
+
+    def _page(self, data):
+        if os.environ.has_key("PAGER"):
+            cmd = os.environ["PAGER"]
+            pipe = os.popen(cmd, 'w')
+            try:
+                pipe.write(data)
+                pipe.close()
+            except IOError:
+                pass # Ignore broken pipes caused by quitting the pager program.
+        else:
+            print "Please define a 'PAGER' environment variable."
+
+    def pageAnnotations(self):
+        ann = self.cov.getAnnotation()
+        for i in ann:
+            print "View annotation for %s? "%i,
+            ans = raw_input()
+            if ans in ["y", "Y"]:
+                self._page("".join(ann[i]))
+
+
+def main():
+    from optparse import OptionParser, OptionGroup
+    parser = OptionParser(version="%prog 0.3")
+    parser.add_option("-a", "--annotate",
+                      action="store_true", dest="annotate",
+                      help="Page annotations")
+    parser.add_option("-c", "--clear",
+                      action="store_true", dest="clear",
+                      help="Clear all .pyc and .pyo files in the project base and included paths")
+    parser.add_option("-d", "--debug",
+                      action="store_true", dest="debug",
+                      help="Debug run - do not catch exceptions")
+    parser.add_option("-q", "--quiet",
+                      action="store_true", dest="quiet",
+                      help="Quiet")
+    parser.add_option("-s", "--stats",
+                      action="store_true", dest="stats",
+                      help="Give coverage stats")
+    parser.add_option("-v", "--verbose",
+                      action="store_true", dest="verbose",
+                      help="Verbose.")
+
+    group = OptionGroup(parser, "Controlling Coverage Paths",
+                        "If a project is structured correctly, these options will rarely be required.")
+    group.add_option("-b", "--base",
+                      action="store", type="string", dest="base", default="..", metavar="DIR",
+                      help='Project base directory. (Default: "..")')
+    group.add_option("-e", "--exclude",
+                      action="append", type="string", dest="exclude", metavar="DIR",
+                      help='Exclude path from coverage analysis. Can be passed multiple times. (Default: ".")')
+    group.add_option("-i", "--include",
+                      action="store", type="string", dest="include", default="..", metavar="DIR",
+                      help='Include path for analysis. (Default: "..")')
+
+    parser.add_option_group(group)
+
+    (options, args) = parser.parse_args()
+
+
+    if not options.exclude:
+        options.exclude = ["."]
+
+    verbosity = 1
+    if options.quiet:
+        verbosity -= 1
+    if options.verbose:
+        verbosity += 1
+
+    if options.clear:
+        for filename in GlobDirectoryWalker(options.include, '*.pyc'):
+            os.remove(filename)
+        for filename in GlobDirectoryWalker(options.base, '*.pyc'):
+            os.remove(filename)
+        for filename in GlobDirectoryWalker(options.include, '*.pyo'):
+            os.remove(filename)
+        for filename in GlobDirectoryWalker(options.base, '*.pyo'):
+            os.remove(filename)
+
+    # Do the actual run
+    t = Tester(options.base, options.include, options.exclude)
+
+    dostats = options.stats or options.annotate
+
+    if args:
+        for i in args:
+            t.addPath(i, dostats)
+    else:
+        t.addPath(".", dostats)
+
+    if options.debug:
+        t.debug()
+    elif dostats:
+        t.coverageRun(verbosity=verbosity)
+    else:
+        t.run(verbosity)
+
+    # Report the results
+    if options.stats:
+        print
+        print 
+        print "                    Coverage"
+        print "                    ========"
+        print
+        t.coverageStats()
+        t.coverageSummary()
+
+    if options.annotate:
+        t.pageAnnotations()
+
+if __name__ == "__main__":
+    main()

Propchange: gump/branches/Gump3/bin/pylid-0.3/pylid.py
------------------------------------------------------------------------------
    svn:executable = *

Added: gump/branches/Gump3/bin/pylid-0.3/test/README
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/README?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/test/README (added)
+++ gump/branches/Gump3/bin/pylid-0.3/test/README Thu Jun 23 14:12:05 2005
@@ -0,0 +1,2 @@
+Note that the pylid unit tests CAN be run using pylid itself, but coverage
+analysis will NOT work.

Added: gump/branches/Gump3/bin/pylid-0.3/test/runAll.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/runAll.py?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/test/runAll.py (added)
+++ gump/branches/Gump3/bin/pylid-0.3/test/runAll.py Thu Jun 23 14:12:05 2005
@@ -0,0 +1,21 @@
+#!/usr/bin/env python
+
+import unittest, os, sys, fnmatch, glob
+
+def makeSuite():
+    """
+        Build a test suite of all available test files.
+    """
+    allTests = unittest.TestSuite()
+    for filename in glob.glob('test_*.py'):
+        modname = os.path.splitext(os.path.basename(filename))[0]
+        module = __import__(modname)
+        allTests.addTest(module.makeSuite())
+    return allTests
+
+
+if __name__ == '__main__':
+    sys.path.append("..")
+
+    testSuite = makeSuite()
+    unittest.TextTestRunner(verbosity=2).run(testSuite)

Propchange: gump/branches/Gump3/bin/pylid-0.3/test/runAll.py
------------------------------------------------------------------------------
    svn:executable = *

Added: gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/dir/dir/test_one.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/dir/dir/test_one.py?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/dir/dir/test_one.py (added)
+++ gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/dir/dir/test_one.py Thu Jun 23 14:12:05 2005
@@ -0,0 +1,7 @@
+
+import unittest
+
+
+class Foo(unittest.TestCase):
+    def testA(self):
+        pass

Added: gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/dir/test_one.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/dir/test_one.py?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/dir/test_one.py (added)
+++ gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/dir/test_one.py Thu Jun 23 14:12:05 2005
@@ -0,0 +1,7 @@
+
+import unittest
+
+
+class Foo(unittest.TestCase):
+    def testA(self):
+        pass

Added: gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/dir/test_one.pyc
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/dir/test_one.pyc?rev=201486&view=auto
==============================================================================
Binary file - no diff available.

Propchange: gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/dir/test_one.pyc
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/dir/test_two.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/dir/test_two.py?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/dir/test_two.py (added)
+++ gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/dir/test_two.py Thu Jun 23 14:12:05 2005
@@ -0,0 +1,7 @@
+
+import unittest
+
+
+class Foo(unittest.TestCase):
+    def testA(self):
+        pass

Added: gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/dir/test_two.pyc
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/dir/test_two.pyc?rev=201486&view=auto
==============================================================================
Binary file - no diff available.

Propchange: gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/dir/test_two.pyc
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/dir/three.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/dir/three.py?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/dir/three.py (added)
+++ gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/dir/three.py Thu Jun 23 14:12:05 2005
@@ -0,0 +1,7 @@
+
+import unittest
+
+
+class Foo(unittest.TestCase):
+    def testA(self):
+        pass

Added: gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/one.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/one.py?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/one.py (added)
+++ gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/one.py Thu Jun 23 14:12:05 2005
@@ -0,0 +1,7 @@
+
+import unittest
+
+
+class Foo(unittest.TestCase):
+    def testA(self):
+        pass

Added: gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/one.pyc
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/one.pyc?rev=201486&view=auto
==============================================================================
Binary file - no diff available.

Propchange: gump/branches/Gump3/bin/pylid-0.3/test/testTester/addPath/one.pyc
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/__init__.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testUnit/__init__.py?rev=201486&view=auto
==============================================================================
    (empty)

Added: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/__init__.pyc
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testUnit/__init__.pyc?rev=201486&view=auto
==============================================================================
Binary file - no diff available.

Propchange: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/__init__.pyc
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/docstrings.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testUnit/docstrings.py?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/test/testUnit/docstrings.py (added)
+++ gump/branches/Gump3/bin/pylid-0.3/test/testUnit/docstrings.py Thu Jun 23 14:12:05 2005
@@ -0,0 +1,13 @@
+"""
+	This is a docstring.
+"""
+def foo():
+	"""
+		docstring
+	"""
+	1
+class Foo:
+	"""
+		docstring
+	"""
+	1

Added: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/docstrings.pyc
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testUnit/docstrings.pyc?rev=201486&view=auto
==============================================================================
Binary file - no diff available.

Propchange: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/docstrings.pyc
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getAnnotation.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getAnnotation.py?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getAnnotation.py (added)
+++ gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getAnnotation.py Thu Jun 23 14:12:05 2005
@@ -0,0 +1,28 @@
+def foo():
+    if 1+1:
+        1
+        1
+        1
+        1
+        1
+        1
+        1
+        1
+        1
+        1
+        1
+    else:
+        1
+        1
+        1
+        1
+        1
+        1
+        1
+        1
+    x = 1
+    x = 1
+    x = 1
+    x = 1
+    if 0-0:
+        1

Added: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getAnnotation.py.annotated
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getAnnotation.py.annotated?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getAnnotation.py.annotated (added)
+++ gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getAnnotation.py.annotated Thu Jun 23 14:12:05 2005
@@ -0,0 +1,28 @@
+def foo():
+    if 1+1:
+        1
+        1
+        1
+        1
+        1
+        1
+        1
+        1
+        1
+        1
+        1
+    else:
+>         1
+>         1
+>         1
+>         1
+>         1
+>         1
+>         1
+>         1
+    x = 1
+    x = 1
+    x = 1
+    x = 1
+    if 0-0:
+>         1

Added: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getAnnotation.pyc
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getAnnotation.pyc?rev=201486&view=auto
==============================================================================
Binary file - no diff available.

Propchange: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getAnnotation.pyc
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getGlobalStats.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getGlobalStats.py?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getGlobalStats.py (added)
+++ gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getGlobalStats.py Thu Jun 23 14:12:05 2005
@@ -0,0 +1,4 @@
+def foo():
+    return 1
+def bar():
+    return 1

Added: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getGlobalStats.pyc
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getGlobalStats.pyc?rev=201486&view=auto
==============================================================================
Binary file - no diff available.

Propchange: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getGlobalStats.pyc
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getGlobalStats2.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getGlobalStats2.py?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getGlobalStats2.py (added)
+++ gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getGlobalStats2.py Thu Jun 23 14:12:05 2005
@@ -0,0 +1,4 @@
+def foo():
+    x = 1
+def bar():
+    x = 1

Added: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getGlobalStats2.pyc
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getGlobalStats2.pyc?rev=201486&view=auto
==============================================================================
Binary file - no diff available.

Propchange: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getGlobalStats2.pyc
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getRanges.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getRanges.py?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getRanges.py (added)
+++ gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getRanges.py Thu Jun 23 14:12:05 2005
@@ -0,0 +1,42 @@
+def foo():
+    if 1:
+        1
+        1
+        1
+        1
+        1
+        1
+        1
+        1
+        1
+    else:
+        1
+        1
+        1
+        1
+        1
+        1
+        1
+        1
+        1
+    x = 1
+    x = 1
+    x = 1
+    x = 1
+    if 1-1:
+        1
+    if 1+1:
+        1
+        1
+        1
+    else:
+        1
+        1
+        1
+        1
+        1
+        1
+        1
+        1
+        1
+        1

Added: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getRanges.py.annotated
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getRanges.py.annotated?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getRanges.py.annotated (added)
+++ gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getRanges.py.annotated Thu Jun 23 14:12:05 2005
@@ -0,0 +1,28 @@
+def foo():
+    if 1:
+        pass
+        pass
+        pass
+        pass
+        pass
+        pass
+        pass
+        pass
+        pass
+        pass
+        pass
+    else:
+>         pass
+>         pass
+>         pass
+>         pass
+>         pass
+>         pass
+>         pass
+>         pass
+    x = 1
+    x = 1
+    x = 1
+    x = 1
+    if 0:
+>         pass

Added: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getRanges.pyc
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getRanges.pyc?rev=201486&view=auto
==============================================================================
Binary file - no diff available.

Propchange: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getRanges.pyc
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getStats.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getStats.py?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getStats.py (added)
+++ gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getStats.py Thu Jun 23 14:12:05 2005
@@ -0,0 +1,4 @@
+def foo():
+    x = 1
+def bar():
+    x = 1

Added: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getStats.pyc
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getStats.pyc?rev=201486&view=auto
==============================================================================
Binary file - no diff available.

Propchange: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getStats.pyc
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getStats2.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getStats2.py?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getStats2.py (added)
+++ gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getStats2.py Thu Jun 23 14:12:05 2005
@@ -0,0 +1,6 @@
+def foo():
+    pass
+def bar():
+    pass
+def boing():
+    pass

Added: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getSummary.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getSummary.py?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getSummary.py (added)
+++ gump/branches/Gump3/bin/pylid-0.3/test/testUnit/getSummary.py Thu Jun 23 14:12:05 2005
@@ -0,0 +1,10 @@
+def foo():
+    x = 1
+    x = 1
+    x = 1
+    x = 1
+    if 0:
+        y = 1
+        y = 1
+        y = 1
+        y = 1

Added: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/makeCoverage.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testUnit/makeCoverage.py?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/test/testUnit/makeCoverage.py (added)
+++ gump/branches/Gump3/bin/pylid-0.3/test/testUnit/makeCoverage.py Thu Jun 23 14:12:05 2005
@@ -0,0 +1,22 @@
+def foo():
+    x = 1           
+    if x:
+        1
+    else:
+        1        
+    try:
+        oink
+    except:
+        1        
+    if 0+0:
+        1
+    elif x:
+        1
+    if x:
+        1
+    elif 0+0:                 # Unlike else, elif is included in the count...
+        1
+    class foo:
+        x = 1
+        def foo(self):
+            y = 2

Added: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/makeCoverage.pyc
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testUnit/makeCoverage.pyc?rev=201486&view=auto
==============================================================================
Binary file - no diff available.

Propchange: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/makeCoverage.pyc
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/makeCoverageReentry.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testUnit/makeCoverageReentry.py?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/test/testUnit/makeCoverageReentry.py (added)
+++ gump/branches/Gump3/bin/pylid-0.3/test/testUnit/makeCoverageReentry.py Thu Jun 23 14:12:05 2005
@@ -0,0 +1,4 @@
+def foo():
+    pass
+def bar():
+    pass

Added: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/makeCoverageReentry.pyc
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testUnit/makeCoverageReentry.pyc?rev=201486&view=auto
==============================================================================
Binary file - no diff available.

Propchange: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/makeCoverageReentry.pyc
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/makeCoverageReentry2.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testUnit/makeCoverageReentry2.py?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/test/testUnit/makeCoverageReentry2.py (added)
+++ gump/branches/Gump3/bin/pylid-0.3/test/testUnit/makeCoverageReentry2.py Thu Jun 23 14:12:05 2005
@@ -0,0 +1,4 @@
+def foo():
+    pass
+def bar():
+    pass

Added: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/makeCoverageReentry2.pyc
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testUnit/makeCoverageReentry2.pyc?rev=201486&view=auto
==============================================================================
Binary file - no diff available.

Propchange: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/makeCoverageReentry2.pyc
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/matching.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testUnit/matching.py?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/test/testUnit/matching.py (added)
+++ gump/branches/Gump3/bin/pylid-0.3/test/testUnit/matching.py Thu Jun 23 14:12:05 2005
@@ -0,0 +1,36 @@
+def foo(on):
+    if on:
+        1
+        1
+    else:
+        1
+        1
+    try:
+        if on:
+            raise "foo"
+    except:
+        1
+        1
+        1
+    if on:
+        1
+    elif 1:
+        1
+    class bug:
+        def __init__(self):
+            pass
+    b = bug()
+    def oink():
+        1
+        1
+        1
+        x = 1
+    oink()
+    def mar():
+        1
+    def moo(a, b, c, d):
+        1
+    x = moo(    1,
+                mar(),
+                mar(),
+                3)

Added: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/matching.pyc
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testUnit/matching.pyc?rev=201486&view=auto
==============================================================================
Binary file - no diff available.

Propchange: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/matching.pyc
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/mymod.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testUnit/mymod.py?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/test/testUnit/mymod.py (added)
+++ gump/branches/Gump3/bin/pylid-0.3/test/testUnit/mymod.py Thu Jun 23 14:12:05 2005
@@ -0,0 +1,29 @@
+
+# MUST be on lines 3, 4, 5
+def run(x, y):
+    z = 1
+    return z
+
+
+def coveragePath():
+    import os.path
+    os.path.isdir("/")
+
+def coveragePath2():        #
+    """
+        A docstring
+    """                     #
+    x = 1                   # 
+    if 0:                   #
+        pass
+    else:
+        pass                #
+    x = [                   #
+            1,
+            2,
+            3
+        ]
+    try:                    #
+        1                   #
+    except:
+        2

Added: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/mymod.pyc
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testUnit/mymod.pyc?rev=201486&view=auto
==============================================================================
Binary file - no diff available.

Propchange: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/mymod.pyc
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/mymod2.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testUnit/mymod2.py?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/test/testUnit/mymod2.py (added)
+++ gump/branches/Gump3/bin/pylid-0.3/test/testUnit/mymod2.py Thu Jun 23 14:12:05 2005
@@ -0,0 +1,29 @@
+
+# MUST be on lines 3, 4, 5
+def run(x, y):
+    z = 1
+    return z
+
+
+def coveragePath():
+    import os.path
+    os.path.isdir("/")
+
+def coveragePath2():        #
+    """
+        A docstring
+    """                     #
+    x = 1                   # 
+    if 0:                   #
+        pass
+    else:
+        pass                #
+    x = [                   #
+            1,
+            2,
+            3
+        ]
+    try:                    #
+        1                   #
+    except:
+        2

Added: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/mymod2.pyc
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/testUnit/mymod2.pyc?rev=201486&view=auto
==============================================================================
Binary file - no diff available.

Propchange: gump/branches/Gump3/bin/pylid-0.3/test/testUnit/mymod2.pyc
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: gump/branches/Gump3/bin/pylid-0.3/test/test_coverage.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/test_coverage.py?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/test/test_coverage.py (added)
+++ gump/branches/Gump3/bin/pylid-0.3/test/test_coverage.py Thu Jun 23 14:12:05 2005
@@ -0,0 +1,187 @@
+import unittest, os.path, sys, pprint
+import token, symbol
+import pylid
+
+TERM = token.NT_OFFSET - 1
+NONTERM = token.NT_OFFSET
+
+# The tests below rely on the fact that .pyc files are not created for the
+# files in testUnit.
+class uCoverage(unittest.TestCase):
+    def setUp(self):
+        self.cov = pylid.Coverage("./testUnit")
+
+    def test_run(self):
+        self.cov.start()
+        import testUnit.mymod
+        testUnit.mymod.run(1, 2)
+        self.cov.stop()
+        self.cov._integrateTrace()
+        linesrun = self.cov.linesRun[os.path.abspath("./testUnit/mymod.py")]
+        self.failUnlessEqual(linesrun, {3:1, 4:1, 5:1})
+
+    def test_docstrings(self):
+        self.cov.start()
+        import testUnit.docstrings
+        testUnit.docstrings.foo()
+        self.cov.stop()
+        self.cov._makeCoverage()
+        self.cov._integrateTrace()
+        pth = os.path.abspath("./testUnit/docstrings.py")
+        self.failIf(self.cov.statementsNotRun[pth])
+
+    def test_coveragePath(self):
+        """
+            Make sure that only files in our coveragePath are covered.
+        """
+        self.cov.start()
+        import testUnit.mymod
+        testUnit.mymod.coveragePath()
+        self.cov.stop()
+        self.cov._integrateTrace()
+        self.failUnless(len(self.cov.linesRun) <= 2)
+        self.failUnless(self.cov.linesRun.has_key(os.path.abspath("./testUnit/mymod.py")))
+
+    def test_excludePath(self):
+        mycov = pylid.Coverage("./testUnit", ["./testUnit/mymod2.py"])
+        mycov.start()
+        import testUnit.mymod, testUnit.mymod2
+        testUnit.mymod.coveragePath()
+        testUnit.mymod2.coveragePath()
+        mycov.stop()
+        mycov._makeCoverage()
+        self.failUnlessEqual(len(mycov.linesRun), 1)
+        self.failUnless(mycov.linesRun.has_key(os.path.abspath("./testUnit/mymod.py")))
+        self.failUnlessEqual(len(mycov.allStatements), 1)
+        self.failUnless(mycov.allStatements.has_key(os.path.abspath("./testUnit/mymod.py")))
+
+    def test_findTerminal(self):
+        lst =   (NONTERM,
+                    (NONTERM,
+                        (TERM, 1, 2)
+                    )
+                )
+        self.failUnlessEqual(self.cov._findTerminal(lst), 2)
+
+    def test_makeCoverage(self):
+        self.cov.start()
+        import testUnit.makeCoverage
+        testUnit.makeCoverage.foo()
+        self.cov.stop()
+        self.cov._makeCoverage()
+        expected = {
+                        os.path.abspath("./testUnit/makeCoverage.py"): [6, 12, 17, 18, 22],
+                    }
+        self.failUnlessEqual(self.cov.statementsNotRun, expected)
+
+    def test_makeCoverageReentry(self):
+        import testUnit.makeCoverageReentry2
+
+        self.cov.start()
+        import testUnit.makeCoverageReentry
+        testUnit.makeCoverageReentry.foo()
+        testUnit.makeCoverageReentry.bar()
+        self.cov.stop()
+
+        self.cov._makeCoverage()
+        expected = {os.path.abspath("./testUnit/makeCoverageReentry.py"): []}
+        self.failUnlessEqual(self.cov.statementsNotRun, expected)
+
+        self.cov.start()
+        import testUnit.makeCoverageReentry2
+        testUnit.makeCoverageReentry2.foo()
+        self.cov.stop()
+
+        self.cov._makeCoverage()
+        expected = {
+                        os.path.abspath("./testUnit/makeCoverageReentry.py"): [],
+                        os.path.abspath("./testUnit/makeCoverageReentry2.py"): [3, 4]
+                        
+                    }
+        self.failUnlessEqual(self.cov.statementsNotRun, expected)
+
+
+    def test_matching(self):
+        """
+            Tests that the results of the traced running matches up with the
+            file parsing.
+        """
+        self.cov.start()
+        import testUnit.matching
+        testUnit.matching.foo(1)
+        testUnit.matching.foo(0)
+        self.cov.stop()
+        self.cov._makeCoverage()
+        self.failUnlessEqual(self.cov.statementsRun, self.cov.allStatements)
+
+    def test_getStats(self):
+        self.cov.start()
+        import testUnit.getStats, testUnit.getRanges
+        testUnit.getStats.foo()
+        testUnit.getRanges.foo()
+        self.cov.stop()
+        expected = [
+                        (os.path.abspath("./testUnit/getStats.py"), {
+                                                    "allStatements": 4,
+                                                    "statementsRun": 3,
+                                                    "coverage": 75.0,
+                                                    "ranges": [4],
+                                                }),
+                        (os.path.abspath("./testUnit/getRanges.py"), {
+                                                    "allStatements": 40,
+                                                    "statementsRun": 20,
+                                                    "coverage": 50.0,
+                                                    "ranges": [(13, 21), 27, (33, 42)],
+                                                })
+                    ]
+        self.failUnlessEqual(self.cov.getStats(), expected)
+
+    def test_getGlobalStats2(self):
+        """
+            Try to trigger a zero-division error
+        """
+        mycov = pylid.Coverage("./foo/bar")
+        mycov.start()
+        import testUnit.getGlobalStats2
+        testUnit.getGlobalStats2.foo()
+        mycov.stop()
+
+    def test_getGlobalStats(self):
+        self.cov.start()
+        import testUnit.getGlobalStats
+        testUnit.getGlobalStats.foo()
+        self.cov.stop()
+        expected = {
+                        'percentage': 75.0,
+                        'statementsRun': 3,
+                        'allStatements': 4
+                    }
+        x = self.cov.getGlobalStats()
+        self.failUnlessEqual(x, expected)
+
+    def _test_getRanges(self):
+        self.cov.start()
+        import testUnit.getRanges
+        testUnit.getRanges.foo()
+        self.cov.stop()
+        expected = {
+                       "./testUnit/getRanges.py": [(15, 22), 28, (34, 39)]
+                    }
+        self.failUnlessEqual(self.cov.getRanges(), expected)
+
+    def test_getAnnotation(self):
+        self.cov.start()
+        import testUnit.getAnnotation
+        testUnit.getAnnotation.foo()
+        self.cov.stop()
+        ann = self.cov.getAnnotation()
+        annotatedFile = open("./testUnit/getAnnotation.py.annotated").readlines()
+        self.failUnlessEqual(len(ann), 1)
+        self.failUnlessEqual(ann[os.path.abspath("./testUnit/getAnnotation.py")], annotatedFile)
+
+
+
+def makeSuite():
+    suite = unittest.makeSuite(uCoverage)
+    return suite
+

Added: gump/branches/Gump3/bin/pylid-0.3/test/test_coverage.pyc
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/test_coverage.pyc?rev=201486&view=auto
==============================================================================
Binary file - no diff available.

Propchange: gump/branches/Gump3/bin/pylid-0.3/test/test_coverage.pyc
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: gump/branches/Gump3/bin/pylid-0.3/test/test_tester.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/test_tester.py?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/test/test_tester.py (added)
+++ gump/branches/Gump3/bin/pylid-0.3/test/test_tester.py Thu Jun 23 14:12:05 2005
@@ -0,0 +1,20 @@
+import unittest
+import pylid
+
+
+class uTester(unittest.TestCase):
+    def setUp(self):
+        self.tt = pylid.Tester(".", "..", "..")
+
+    def test_addPath(self):
+        self.tt.addPath("testTester/addPath/one.py", 0)
+        self.failUnlessEqual(self.tt.suite.countTestCases(), 1)
+
+    def test_addPathDir(self):
+        self.tt.addPath("testTester/addPath/dir", 0)
+        self.failUnlessEqual(self.tt.suite.countTestCases(), 2)
+
+
+def makeSuite():
+    suite = unittest.makeSuite(uTester)
+    return suite

Added: gump/branches/Gump3/bin/pylid-0.3/test/test_tester.pyc
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/test_tester.pyc?rev=201486&view=auto
==============================================================================
Binary file - no diff available.

Propchange: gump/branches/Gump3/bin/pylid-0.3/test/test_tester.pyc
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: gump/branches/Gump3/bin/pylid-0.3/test/test_utils.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/test_utils.py?rev=201486&view=auto
==============================================================================
--- gump/branches/Gump3/bin/pylid-0.3/test/test_utils.py (added)
+++ gump/branches/Gump3/bin/pylid-0.3/test/test_utils.py Thu Jun 23 14:12:05 2005
@@ -0,0 +1,33 @@
+
+import unittest, os.path
+from pylid import isPathContained, summariseList
+
+class uUtils(unittest.TestCase):
+    def test_isPathContained(self):
+        self.failUnless(isPathContained(os.path.abspath("."), "./foo.py"))
+        self.failUnless(isPathContained(os.path.abspath(".."), "."))
+        self.failIf(isPathContained(os.path.abspath("."), "../foo.py"))
+        self.failUnless(isPathContained(os.path.abspath("."), "."))
+        self.failUnless(isPathContained(os.path.abspath("../foo.py"), "../foo.py"))
+
+    def test_summariseList(self):
+        lst = [1, 2, 3, 4, 5]
+        expected = [(1, 5)]
+        self.failUnless(summariseList(lst) == expected)
+
+        lst = []
+        expected = []
+        self.failUnless(summariseList(lst) == expected)
+        
+        lst = [1]
+        expected = [1]
+        self.failUnless(summariseList(lst) == expected)
+
+        lst = [1, 2, 3, 8, 11, 12, 13, 15, 16, 17, 23]
+        expected = [(1, 3), 8, (11, 13), (15, 17), 23]
+        self.failUnless(summariseList(lst) == expected)
+
+
+def makeSuite():
+    suite = unittest.makeSuite(uUtils)
+    return suite

Added: gump/branches/Gump3/bin/pylid-0.3/test/test_utils.pyc
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/bin/pylid-0.3/test/test_utils.pyc?rev=201486&view=auto
==============================================================================
Binary file - no diff available.

Propchange: gump/branches/Gump3/bin/pylid-0.3/test/test_utils.pyc
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



Mime
View raw message