From efdc8e84ca893d2314758d5b9eeef7cedb1c8c83 Mon Sep 17 00:00:00 2001
From: Paul Wicks <pwicks86@gmail.com>
Date: Wed, 30 May 2018 17:00:35 -0700
Subject: Update test to include a tag that should be skipped due to being in
 the skipped portion of samples

---
 gr-blocks/python/blocks/qa_skiphead.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

(limited to 'gr-blocks/python')

diff --git a/gr-blocks/python/blocks/qa_skiphead.py b/gr-blocks/python/blocks/qa_skiphead.py
index 098e7b1e94..16a4ba13b4 100755
--- a/gr-blocks/python/blocks/qa_skiphead.py
+++ b/gr-blocks/python/blocks/qa_skiphead.py
@@ -114,7 +114,8 @@ class test_skiphead(gr_unittest.TestCase):
         skip_cnt = 25
         expected_result = tuple(self.src_data[skip_cnt:])
 
-        src_tags = tuple([make_tag('foo', 'bar', 50, 'src')])
+        src_tags = tuple([make_tag('foo', 'bar', 1, 'src'),
+                          make_tag('baz', 'qux', 50, 'src')])
         src1 = blocks.vector_source_i(self.src_data, tags=src_tags)
         op = blocks.skiphead(gr.sizeof_int, skip_cnt)
         dst1 = blocks.vector_sink_i()
@@ -123,6 +124,11 @@ class test_skiphead(gr_unittest.TestCase):
         dst_data = dst1.data()
         self.assertEqual(expected_result, dst_data)
         self.assertEqual(dst1.tags()[0].offset, 25, "Tag offset is incorrect")
+        self.assertEqual(len(dst1.tags()), 1, "Wrong number of tags received")
+        self.assertEqual(pmt.to_python(
+            dst1.tags()[0].key), "baz", "Tag key is incorrect")
+        self.assertEqual(pmt.to_python(
+            dst1.tags()[0].value), "qux", "Tag value is incorrect")
 
 if __name__ == '__main__':
     gr_unittest.run(test_skiphead, "test_skiphead.xml")
-- 
cgit v1.2.3