summaryrefslogtreecommitdiff
path: root/python/subunit/tests/test_test_protocol.py
diff options
context:
space:
mode:
authorRobert Collins <robertc@robertcollins.net>2012-01-11 18:42:53 +1300
committerRobert Collins <robertc@robertcollins.net>2012-01-11 18:42:53 +1300
commit00461beb4b64db6050cc38f70122c475394df057 (patch)
tree04463a3a6c1fa16966b0b640769919ab5373f470 /python/subunit/tests/test_test_protocol.py
parente314172fac2c7184587ebf196414028df397f78c (diff)
downloadsubunit-00461beb4b64db6050cc38f70122c475394df057.tar.gz
Tag support has been implemented for TestProtocolClient.
(Robert Collins, #518016)
Diffstat (limited to 'python/subunit/tests/test_test_protocol.py')
-rw-r--r--python/subunit/tests/test_test_protocol.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/python/subunit/tests/test_test_protocol.py b/python/subunit/tests/test_test_protocol.py
index 019c080..091b370 100644
--- a/python/subunit/tests/test_test_protocol.py
+++ b/python/subunit/tests/test_test_protocol.py
@@ -1299,6 +1299,22 @@ class TestTestProtocolClient(unittest.TestCase):
"something\n"
"F\r\nserialised\nform0\r\n]\n" % self.test.id()))
+ def test_tags_empty(self):
+ self.protocol.tags(set(), set())
+ self.assertEqual(_b(""), self.io.getvalue())
+
+ def test_tags_add(self):
+ self.protocol.tags(set(['foo']), set())
+ self.assertEqual(_b("tags: foo\n"), self.io.getvalue())
+
+ def test_tags_both(self):
+ self.protocol.tags(set(['quux']), set(['bar']))
+ self.assertEqual(_b("tags: quux -bar\n"), self.io.getvalue())
+
+ def test_tags_gone(self):
+ self.protocol.tags(set(), set(['bar']))
+ self.assertEqual(_b("tags: -bar\n"), self.io.getvalue())
+
def test_suite():
loader = subunit.tests.TestUtil.TestLoader()