From 78a8d097a53203d717a653fe3184874bc988660f Mon Sep 17 00:00:00 2001 From: Thomi Richards Date: Tue, 19 Nov 2013 12:34:53 +1300 Subject: Add support for tags. --- python/subunit/tests/test_output_filter.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'python/subunit/tests') 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): -- cgit v1.2.1