summaryrefslogtreecommitdiff
path: root/gr-blocks/python/blocks/qa_skiphead.py
diff options
context:
space:
mode:
Diffstat (limited to 'gr-blocks/python/blocks/qa_skiphead.py')
-rwxr-xr-xgr-blocks/python/blocks/qa_skiphead.py8
1 files changed, 7 insertions, 1 deletions
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")