From 5081ba6802818d5a5533985c0e3a0c1fa5b6321b Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Tue, 24 Nov 2015 10:45:07 -0800 Subject: It appears the same test object was returned multiple times for different unit tests, so tracking tests with sets wouldn't work unless I extracted the details relevant to the particular test. For now a simple count will work so using a set was unnecessary anyways. --- lib/spack/spack/test/tally_plugin.py | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) (limited to 'lib') diff --git a/lib/spack/spack/test/tally_plugin.py b/lib/spack/spack/test/tally_plugin.py index b38f4f3134..e314fae6ce 100644 --- a/lib/spack/spack/test/tally_plugin.py +++ b/lib/spack/spack/test/tally_plugin.py @@ -31,21 +31,9 @@ class Tally(Plugin): def __init__(self): super(Tally, self).__init__() - self.successes = set() - self.failures = set() - self.errors = set() - - @property - def successCount(self): - return len(self.successes) - - @property - def failCount(self): - return len(self.failures) - - @property - def errorCount(self): - return len(self.errors) + self.successCount = 0 + self.failCount = 0 + self.errorCount = 0 @property def numberOfTests(self): @@ -58,13 +46,13 @@ class Tally(Plugin): super(Tally, self).configure(options, conf) def addSuccess(self, test): - self.successes.add(test) + self.successCount += 1 def addError(self, test, err): - self.errors.add(test) + self.errorCount += 1 def addFailure(self, test, err): - test.failures.add(test) + self.failCount += 1 def finalize(self, result): pass -- cgit v1.2.3-70-g09d2