summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorRobert Collins <robertc@robertcollins.net>2011-05-02 11:06:27 +1200
committerRobert Collins <robertc@robertcollins.net>2011-05-02 11:06:27 +1200
commit098f465f5547aa75379e4e8b0b067d22fa7f34b3 (patch)
tree59632aca18d0ca79d3baa9a45cd2f0460c05d1e0 /python
parentb67756431fd3a5ebae3f6e0eba7185656b9459d4 (diff)
downloadsubunit-git-098f465f5547aa75379e4e8b0b067d22fa7f34b3.tar.gz
Support testsRun on the tag and time collapsing decorators.
Diffstat (limited to 'python')
-rw-r--r--python/subunit/test_results.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/python/subunit/test_results.py b/python/subunit/test_results.py
index 6b43df1..e3240e0 100644
--- a/python/subunit/test_results.py
+++ b/python/subunit/test_results.py
@@ -82,6 +82,10 @@ class TestResultDecorator(object):
def stop(self):
return self.decorated.stop()
+ @property
+ def testsRun(self):
+ return self.decorated.testsRun
+
def tags(self, new_tags, gone_tags):
return self.decorated.tags(new_tags, gone_tags)
@@ -201,8 +205,6 @@ class TagCollapsingDecorator(TestResultDecorator):
def __init__(self, result):
super(TagCollapsingDecorator, self).__init__(result)
- # The current test (for filtering tags)
- self._current_test = None
# The (new, gone) tags for the current test.
self._current_test_tags = None
@@ -213,7 +215,6 @@ class TagCollapsingDecorator(TestResultDecorator):
correctly.
"""
self.decorated.startTest(test)
- self._current_test = test
self._current_test_tags = set(), set()
def stopTest(self, test):
@@ -226,7 +227,6 @@ class TagCollapsingDecorator(TestResultDecorator):
if self._current_test_tags[0] or self._current_test_tags[1]:
self.decorated.tags(*self._current_test_tags)
self.decorated.stopTest(test)
- self._current_test = None
self._current_test_tags = None
def tags(self, new_tags, gone_tags):
@@ -238,7 +238,7 @@ class TagCollapsingDecorator(TestResultDecorator):
:param new_tags: Tags to add,
:param gone_tags: Tags to remove.
"""
- if self._current_test is not None:
+ if self._current_test_tags is not None:
# gather the tags until the test stops.
self._current_test_tags[0].update(new_tags)
self._current_test_tags[0].difference_update(gone_tags)