summaryrefslogtreecommitdiff
path: root/python/subunit/tests
diff options
context:
space:
mode:
authorJonathan Lange <jml@canonical.com>2011-02-12 12:16:36 +0000
committerJonathan Lange <jml@canonical.com>2011-02-12 12:16:36 +0000
commit0f644eda8f3af105622ef30c7c6739c6b26fe7e8 (patch)
tree404c939c84b8998928758685463a53678438bc9d /python/subunit/tests
parent255d00653139619a8d1eb6a0efaefbbc842e5bbb (diff)
downloadsubunit-git-0f644eda8f3af105622ef30c7c6739c6b26fe7e8.tar.gz
Implement the tag collapsing logic by stealing stuff from TRF and fixing it.
Diffstat (limited to 'python/subunit/tests')
-rw-r--r--python/subunit/tests/test_test_results.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/python/subunit/tests/test_test_results.py b/python/subunit/tests/test_test_results.py
index 0bc7e24..7aed8a4 100644
--- a/python/subunit/tests/test_test_results.py
+++ b/python/subunit/tests/test_test_results.py
@@ -199,6 +199,21 @@ class TestTagCollapsingDecorator(TestCase):
self.assertEquals(
[('tags', set(['a', 'b']), set([]))], result._events)
+ def test_tags_collapsed_inside_of_tests(self):
+ result = ExtendedTestResult()
+ tag_collapser = subunit.test_results.TagCollapsingDecorator(result)
+ test = subunit.RemotedTestCase('foo')
+ tag_collapser.startTest(test)
+ tag_collapser.tags(set(['a']), set())
+ tag_collapser.tags(set(['b']), set(['a']))
+ tag_collapser.tags(set(['c']), set())
+ tag_collapser.stopTest(test)
+ self.assertEquals(
+ [('startTest', test),
+ ('tags', set(['b', 'c']), set(['a'])),
+ ('stopTest', test)],
+ result._events)
+
def test_suite():
loader = subunit.tests.TestUtil.TestLoader()