summaryrefslogtreecommitdiff
path: root/python/subunit/tests
diff options
context:
space:
mode:
authorJonathan Lange <jml@mumak.net>2012-04-20 12:32:41 +0100
committerJonathan Lange <jml@mumak.net>2012-04-20 12:32:41 +0100
commitd3afccca4ff8367fbc6d46ca22dc01cc3751ba11 (patch)
tree507a99c87e6a934e925b57dd4802ccccbace6d8d /python/subunit/tests
parent3ad082ba5d9ae87b56d25bf34d0fa3fc09b41c27 (diff)
downloadsubunit-d3afccca4ff8367fbc6d46ca22dc01cc3751ba11.tar.gz
Flush global tags too.
Diffstat (limited to 'python/subunit/tests')
-rw-r--r--python/subunit/tests/test_test_results.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/python/subunit/tests/test_test_results.py b/python/subunit/tests/test_test_results.py
index 09b4c2f..3c4f686 100644
--- a/python/subunit/tests/test_test_results.py
+++ b/python/subunit/tests/test_test_results.py
@@ -212,6 +212,25 @@ class TestTagCollapsingDecorator(TestCase):
('startTest', self),
], result._events)
+ def test_tags_collapsed_outside_of_tests_are_flushed(self):
+ result = ExtendedTestResult()
+ tag_collapser = subunit.test_results.TagCollapsingDecorator(result)
+ tag_collapser.startTestRun()
+ tag_collapser.tags(set(['a']), set())
+ tag_collapser.tags(set(['b']), set())
+ tag_collapser.startTest(self)
+ tag_collapser.addSuccess(self)
+ tag_collapser.stopTest(self)
+ tag_collapser.stopTestRun()
+ self.assertEquals(
+ [('startTestRun',),
+ ('tags', set(['a', 'b']), set([])),
+ ('startTest', self),
+ ('addSuccess', self),
+ ('stopTest', self),
+ ('stopTestRun',),
+ ], result._events)
+
def test_tags_forwarded_after_tests(self):
test = subunit.RemotedTestCase('foo')
result = ExtendedTestResult()