summaryrefslogtreecommitdiff
path: root/selftest/format-subunit
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-09-13 20:53:54 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-09-14 10:54:26 +0200
commit8530d5afdee8fbc4d87398839d37c503dc05410d (patch)
treebb0b6513326857f34ac85105a25cf0976009ecd7 /selftest/format-subunit
parent4c45e291a77ba300d88ca7a9f3fb3153b6e4b3dc (diff)
downloadsamba-8530d5afdee8fbc4d87398839d37c503dc05410d.tar.gz
samba-8530d5afdee8fbc4d87398839d37c503dc05410d.tar.bz2
samba-8530d5afdee8fbc4d87398839d37c503dc05410d.zip
subunit: Initial work on using the standard TestResult class.
Diffstat (limited to 'selftest/format-subunit')
-rwxr-xr-xselftest/format-subunit7
1 files changed, 4 insertions, 3 deletions
diff --git a/selftest/format-subunit b/selftest/format-subunit
index b4509ab1cf..31136b05ff 100755
--- a/selftest/format-subunit
+++ b/selftest/format-subunit
@@ -14,6 +14,7 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/testtools"))
import subunithelper
import subunit
+import testtools
def format_time(t):
minutes, seconds = divmod(t, 60)
@@ -27,7 +28,7 @@ def format_time(t):
return ret
-class PlainFormatter(object):
+class PlainFormatter(testtools.testresult.TestResult):
def __init__(self, summaryfile, verbose, immediate, statistics,
totaltests=None):
@@ -69,7 +70,7 @@ class PlainFormatter(object):
duration = testsuite_start_time - self.start_time
if not self.verbose:
- self.test_output[name] = ""
+ self.test_output[name] = ""
out = "[%d" % self.index
if self.totalsuites is not None:
@@ -77,7 +78,7 @@ class PlainFormatter(object):
out += " in " + format_time(duration)
if self.suitesfailed:
out += ", %d errors" % (len(self.suitesfailed),)
- out += "] %s" % name
+ out += "] %s" % name
if self.immediate:
sys.stdout.write(out + "\n")
else: