summaryrefslogtreecommitdiff
path: root/python/subunit/tests
diff options
context:
space:
mode:
authorJonathan Lange <jml@mumak.net>2012-04-20 10:57:47 +0100
committerJonathan Lange <jml@mumak.net>2012-04-20 10:57:47 +0100
commit5a06e9fdf9002bffcf2bfb63f7177526fd1db2b7 (patch)
treef6b04299bf11a3773065a0c7a659d5b1f301f7ed /python/subunit/tests
parent3788661391d21b472de7e422568863ec4adf09e8 (diff)
downloadsubunit-5a06e9fdf9002bffcf2bfb63f7177526fd1db2b7.tar.gz
Properly scope tag collapsing
Diffstat (limited to 'python/subunit/tests')
-rw-r--r--python/subunit/tests/test_subunit_filter.py1
-rw-r--r--python/subunit/tests/test_test_results.py16
2 files changed, 17 insertions, 0 deletions
diff --git a/python/subunit/tests/test_subunit_filter.py b/python/subunit/tests/test_subunit_filter.py
index e04090d..35d4603 100644
--- a/python/subunit/tests/test_subunit_filter.py
+++ b/python/subunit/tests/test_subunit_filter.py
@@ -301,6 +301,7 @@ xfail todo
('startTest', foo),
('addSuccess', foo),
('stopTest', foo),
+ ('tags', set(), set(['a'])),
],
events)
diff --git a/python/subunit/tests/test_test_results.py b/python/subunit/tests/test_test_results.py
index d11f482..750958e 100644
--- a/python/subunit/tests/test_test_results.py
+++ b/python/subunit/tests/test_test_results.py
@@ -208,6 +208,22 @@ class TestTagCollapsingDecorator(TestCase):
self.assertEquals(
[('tags', set(['a', 'b']), set([]))], result._events)
+ def test_tags_forwarded_after_tests(self):
+ test = subunit.RemotedTestCase('foo')
+ result = ExtendedTestResult()
+ tag_collapser = subunit.test_results.TagCollapsingDecorator(result)
+ tag_collapser.startTest(test)
+ tag_collapser.addSuccess(test)
+ tag_collapser.stopTest(test)
+ tag_collapser.tags(set(['a']), set(['b']))
+ self.assertEqual(
+ [('startTest', test),
+ ('addSuccess', test),
+ ('stopTest', test),
+ ('tags', set(['a']), set(['b'])),
+ ],
+ result._events)
+
def test_tags_collapsed_inside_of_tests(self):
result = ExtendedTestResult()
tag_collapser = subunit.test_results.TagCollapsingDecorator(result)