summaryrefslogtreecommitdiff
path: root/python/subunit/tests
diff options
context:
space:
mode:
authorThomi Richards <thomi.richards@canonical.com>2013-11-19 12:34:53 +1300
committerThomi Richards <thomi.richards@canonical.com>2013-11-19 12:34:53 +1300
commit78a8d097a53203d717a653fe3184874bc988660f (patch)
tree53127250ee8c529ca87ba7e78111a36f350a901e /python/subunit/tests
parente30001daaf6ce2ee233ce856a87df4d16b389062 (diff)
downloadsubunit-git-78a8d097a53203d717a653fe3184874bc988660f.tar.gz
Add support for tags.
Diffstat (limited to 'python/subunit/tests')
-rw-r--r--python/subunit/tests/test_output_filter.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/python/subunit/tests/test_output_filter.py b/python/subunit/tests/test_output_filter.py
index bddcc99..8b2f54b 100644
--- a/python/subunit/tests/test_output_filter.py
+++ b/python/subunit/tests/test_output_filter.py
@@ -89,6 +89,13 @@ class OutputFilterArgumentParserTests(TestCase):
)
self.assertThat(args.mimetype, Equals("text/plain"))
+ def test_all_commands_accept_tags_argument(self):
+ for command in self._all_supported_commands:
+ args = safe_parse_arguments(
+ args=[command, 'foo', '--tags', "foo,bar,baz"]
+ )
+ self.assertThat(args.tags, Equals(["foo","bar","baz"]))
+
class ByteStreamCompatibilityTests(TestCase):
@@ -196,6 +203,20 @@ class ByteStreamCompatibilityTests(TestCase):
)
)
+ def test_tags_are_generated(self):
+ result = self._get_result_for(
+ ['exists', 'foo', '--tags', 'hello,world']
+ )
+ self.assertThat(
+ result._events[0],
+ MatchesCall(
+ call='status',
+ test_id='foo',
+ test_tags=set(['hello','world']),
+ timestamp=self._dummy_timestamp,
+ )
+ )
+
class FileChunkingTests(TestCase):