summaryrefslogtreecommitdiffstats
path: root/misc/testsuite/lib/TestCase.py
diff options
context:
space:
mode:
authorot <ot@localhost>2008-07-28 19:38:26 +0000
committerot <ot@localhost>2008-07-28 19:38:26 +0000
commit45054cf053c588c014d8a63f3848bb1718c1071f (patch)
tree922827a3d017498fc1e69f6f47fe5e4b342d2a05 /misc/testsuite/lib/TestCase.py
parent438ba56bc4d2b057aec883c8c7254462e3733b65 (diff)
downloadmarkup-validator-45054cf053c588c014d8a63f3848bb1718c1071f.zip
markup-validator-45054cf053c588c014d8a63f3848bb1718c1071f.tar.gz
markup-validator-45054cf053c588c014d8a63f3848bb1718c1071f.tar.bz2
finalizing routines and templates for the listing and generation of test cases documentation from the catalog - needs jinja2 template engine
Diffstat (limited to 'misc/testsuite/lib/TestCase.py')
-rw-r--r--misc/testsuite/lib/TestCase.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/misc/testsuite/lib/TestCase.py b/misc/testsuite/lib/TestCase.py
index 4170251..15af48e 100644
--- a/misc/testsuite/lib/TestCase.py
+++ b/misc/testsuite/lib/TestCase.py
@@ -87,10 +87,13 @@ class ValidatorTestSuite:
raise v
return ts_node
- def readTestCollection(self, collection_node):
+ def readTestCollection(self, collection_node, level=None):
"""read a test collection from a given ElementTree collection node
The collection can have test cases as children (which will be read and returned)"""
+ if level == None:
+ level = 0
testcollection = ValidatorTestCollection()
+ testcollection.level = level
if collection_node.attrib.has_key("id"):
testcollection.collection_id = collection_node.attrib["id"]
else:
@@ -110,7 +113,7 @@ class ValidatorTestSuite:
self.collections.append(testcollection)
for child_node in collection_node.getchildren():
if child_node.tag == "collection":
- self.readTestCollection(child_node)
+ self.readTestCollection(child_node, level=level+1)
def readTestCase(self, testcase_node):
@@ -137,6 +140,7 @@ class ValidatorTestCollection(unittest.TestSuite):
def __init__(self):
super(ValidatorTestCollection, self).__init__()
self.collection_id = None
+ self.level = None
self.title = None