[Checkins] SVN: manuel/branches/elro-test-count/src/manuel/ Regions must be marked countable to be inlcuded in the test count

Laurence Rowe l at lrowe.co.uk
Fri Aug 13 14:50:24 EDT 2010


Log message for revision 115674:
  Regions must be marked countable to be inlcuded in the test count

Changed:
  U   manuel/branches/elro-test-count/src/manuel/__init__.py
  U   manuel/branches/elro-test-count/src/manuel/doctest.py
  U   manuel/branches/elro-test-count/src/manuel/table-example.txt
  U   manuel/branches/elro-test-count/src/manuel/testing.py

-=-
Modified: manuel/branches/elro-test-count/src/manuel/__init__.py
===================================================================
--- manuel/branches/elro-test-count/src/manuel/__init__.py	2010-08-13 18:34:41 UTC (rev 115673)
+++ manuel/branches/elro-test-count/src/manuel/__init__.py	2010-08-13 18:50:23 UTC (rev 115674)
@@ -45,6 +45,7 @@
     parsed = None
     evaluated = None
     formatted = None
+    countable = False
 
     def __init__(self, lineno, source, start_match=None, end_match=None,
             provenance=None):

Modified: manuel/branches/elro-test-count/src/manuel/doctest.py
===================================================================
--- manuel/branches/elro-test-count/src/manuel/doctest.py	2010-08-13 18:34:41 UTC (rev 115673)
+++ manuel/branches/elro-test-count/src/manuel/doctest.py	2010-08-13 18:50:23 UTC (rev 115674)
@@ -56,6 +56,7 @@
             for chunk in group:
                 chunk.lineno -= chunk_0_lineno
             found.parsed = group
+            found.countable = True
 
             assert region in document
 

Modified: manuel/branches/elro-test-count/src/manuel/table-example.txt
===================================================================
--- manuel/branches/elro-test-count/src/manuel/table-example.txt	2010-08-13 18:34:41 UTC (rev 115673)
+++ manuel/branches/elro-test-count/src/manuel/table-example.txt	2010-08-13 18:50:23 UTC (rev 115674)
@@ -137,6 +137,7 @@
             table = Table(expression, variables, examples)
             document.claim_region(region)
             region.parsed = table
+            region.countable = True
 
 If we parse the Document we can see that the table was recognized.
 

Modified: manuel/branches/elro-test-count/src/manuel/testing.py
===================================================================
--- manuel/branches/elro-test-count/src/manuel/testing.py	2010-08-13 18:34:41 UTC (rev 115673)
+++ manuel/branches/elro-test-count/src/manuel/testing.py	2010-08-13 18:50:23 UTC (rev 115674)
@@ -49,7 +49,7 @@
         self.tearDown()
 
     def countTestCases(self):
-        return len([r for r in self.regions if r.parsed])
+        return len([r for r in self.regions if r.parsed and r.countable])
 
     def id(self):
         return self.regions.id



More information about the checkins mailing list