summaryrefslogtreecommitdiff
path: root/source4/scripting/python/subunit
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-02-12 21:59:23 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-02-12 21:59:23 +0100
commitfdd75e135a8cb43f946af99120566f744df2a8e0 (patch)
tree4772336d3168acaee9cde60766798f5de746534f /source4/scripting/python/subunit
parent1ed346fcb37f302341f528e2f8465d389f586742 (diff)
downloadsamba-fdd75e135a8cb43f946af99120566f744df2a8e0.tar.gz
samba-fdd75e135a8cb43f946af99120566f744df2a8e0.tar.bz2
samba-fdd75e135a8cb43f946af99120566f744df2a8e0.zip
Correctly increment counters in Subunit test runner.
(This used to be commit c474a2bb83a3e28a0b83f3b8ca1b646742dfca3d)
Diffstat (limited to 'source4/scripting/python/subunit')
-rw-r--r--source4/scripting/python/subunit/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/scripting/python/subunit/__init__.py b/source4/scripting/python/subunit/__init__.py
index 4d3434a3ea..7fcb815937 100644
--- a/source4/scripting/python/subunit/__init__.py
+++ b/source4/scripting/python/subunit/__init__.py
@@ -218,6 +218,7 @@ class TestProtocolClient(unittest.TestResult):
for line in self._exc_info_to_string(error, test).splitlines():
self._stream.write("%s\n" % line)
self._stream.write("]\n")
+ super(TestProtocolClient, self).addError(test, error)
def addFailure(self, test, error):
"""Report a failure in test test."""
@@ -225,14 +226,17 @@ class TestProtocolClient(unittest.TestResult):
for line in self._exc_info_to_string(error, test).splitlines():
self._stream.write("%s\n" % line)
self._stream.write("]\n")
+ super(TestProtocolClient, self).addFailure(test, error)
def addSuccess(self, test):
"""Report a success in a test."""
self._stream.write("successful: %s\n" % (test.shortDescription() or str(test)))
+ super(TestProtocolClient, self).addSuccess(test)
def startTest(self, test):
"""Mark a test as starting its test run."""
self._stream.write("test: %s\n" % (test.shortDescription() or str(test)))
+ super(TestProtocolClient, self).startTest(test)
def RemoteError(description=""):
@@ -379,6 +383,5 @@ class SubunitTestRunner:
def run(self, test):
"Run the given test case or test suite."
result = TestProtocolClient(self.stream)
- test(result)
return result