[Checkins] SVN: z3c.coverage/trunk/ - Bug: When a package path contained anywhere the word "test", it was ignored

Stephan Richter srichter at cosmos.phy.tufts.edu
Mon Apr 14 14:38:54 EDT 2008


Log message for revision 85356:
  - Bug: When a package path contained anywhere the word "test", it was ignored
    from the coverage report. The intended behavior, however, was to ignore
    files that relate to setting up tests.
  
  Get ready for release.
  
  

Changed:
  U   z3c.coverage/trunk/CHANGES.txt
  U   z3c.coverage/trunk/setup.py
  U   z3c.coverage/trunk/src/z3c/coverage/README.txt
  U   z3c.coverage/trunk/src/z3c/coverage/coveragereport.py

-=-
Modified: z3c.coverage/trunk/CHANGES.txt
===================================================================
--- z3c.coverage/trunk/CHANGES.txt	2008-04-14 16:18:51 UTC (rev 85355)
+++ z3c.coverage/trunk/CHANGES.txt	2008-04-14 18:38:52 UTC (rev 85356)
@@ -2,22 +2,30 @@
 CHANGES
 =======
 
-(unreleased)
-------------
+1.1.2 (2008-04-14)
+------------------
 
-- Bug: sort the results of os.listdir() in README.txt to avoid nondeterministic
-  failures.
-- Bug: the logic for ignoring unit and functional test modules also used to
-  ignore modules and packages called 'testing'.
+- Bug: When a package path contained anywhere the word "test", it was ignored
+  from the coverage report. The intended behavior, however, was to ignore
+  files that relate to setting up tests.
+
+- Bug: Sort the results of `os.listdir()` in `README.txt` to avoid
+  non-deterministic failures.
+
+- Bug: The logic for ignoring unit and functional test modules also used to
+  ignore modules and packages called `testing`.
+
 - Change "Unit test coverage" to "Test coverage" in the title -- it works
   perfectly fine for functional tests too.
 
+
 1.1.1 (2008-01-31)
 ------------------
 
 - Bug: When the package was released, the test which tests the availability of
   an SVN revision number failed. Made the test more reliable.
 
+
 1.1.0 (2008-01-29)
 ------------------
 

Modified: z3c.coverage/trunk/setup.py
===================================================================
--- z3c.coverage/trunk/setup.py	2008-04-14 16:18:51 UTC (rev 85355)
+++ z3c.coverage/trunk/setup.py	2008-04-14 18:38:52 UTC (rev 85356)
@@ -23,7 +23,7 @@
 
 setup (
     name='z3c.coverage',
-    version='1.1.2dev',
+    version='1.1.2',
     author = "Zope Community",
     author_email = "zope3-dev at zope.org",
     description = "A script to visualize coverage reports via HTML",

Modified: z3c.coverage/trunk/src/z3c/coverage/README.txt
===================================================================
--- z3c.coverage/trunk/src/z3c/coverage/README.txt	2008-04-14 16:18:51 UTC (rev 85355)
+++ z3c.coverage/trunk/src/z3c/coverage/README.txt	2008-04-14 18:38:52 UTC (rev 85356)
@@ -75,7 +75,7 @@
   >>> initNode.percent
   100
 
-We can ask for the amoutn of uncovered lines:
+We can ask for the amount of uncovered lines:
 
   >>> z3cNode.uncovered
   94

Modified: z3c.coverage/trunk/src/z3c/coverage/coveragereport.py
===================================================================
--- z3c.coverage/trunk/src/z3c/coverage/coveragereport.py	2008-04-14 16:18:51 UTC (rev 85355)
+++ z3c.coverage/trunk/src/z3c/coverage/coveragereport.py	2008-04-14 18:38:52 UTC (rev 85356)
@@ -377,7 +377,7 @@
 
 def filter_fn(filename):
     """Filter interesting coverage files.
-    
+
         >>> filter_fn('z3c.coverage.__init__.cover')
         True
         >>> filter_fn('z3c.coverage.tests.cover')
@@ -388,15 +388,19 @@
         False
         >>> filter_fn('z3c.coverage.testing.cover')
         True
+        >>> filter_fn('z3c.coverage.testname.cover')
+        True
         >>> filter_fn('something-unrelated.txt')
         False
         >>> filter_fn('<doctest something-useless.cover')
         False
 
     """
+    parts = filename.split('.')
     return (filename.endswith('.cover') and
-            'tests' not in filename and
-            not filename.startswith('<'))
+            not filename.startswith('<') and
+            'tests' not in parts and
+            'ftests' not in parts)
 
 
 def make_coverage_reports(path, report_path):



More information about the Checkins mailing list